Atenție! Aceasta este o versiune veche a paginii., scrisă la 2016-10-05 18:09:37.000.
Revizia anterioară   Revizia următoare  

Fișierul intrare/ieșire bigcircle.in, bigcircle.out Sursă JBOI 2014
Autor autor necunoscut Adăugată de avatar Isabela_coman Coman Isabela Patricia Isabela_coman
Timp de execuție pe test 0.15 sec Limită de memorie 16384 KB
Scorul tău N/A Dificultate stea de rating de tip fullstea de rating de tip fullstea de rating de tip fullstea de rating de tip halfstea de rating de tip empty
open book Poți vedea testele pentru această problemă accesând atașamentele .

Bigcircle (JBOI)

On the opening ceremony of World Cup there was a part where many kids from around the world was trying to make a big circle on the field which symbolized tolerance and multicultural friendship. They succeed in making a perfect circle, but as they didn’t practice very much, kids weren’t uniformly distributed on circle. You spotted that very quickly, and you want to know what is the minimum distance between some two kids.

Date de intrare

Fișierul de intrare bigcircle.in: First line of the input contains number N representing number of kids. Each of next N lines contains two real numbers rounded on two decimal places – coordinates of the each kid. It is guaranteed that all points will be on circle.

Date de ieșire

În fișierul de ieșire bigcircle.out:
First and only line of output should contain one real number (rounded on two decimal places) – Euclidian distance between two nearest kids. Euclidian distance between points (x1, y1) and (x2, y2) is: sqrt((x1 − x2)2 + (y1 − y2)2)

Restricții

  • 2 ≤ N ≤ 10^5
  • All coordinates will be in interval [−106, 106]
  • In 20% of test cases it will hold N ≤ 103

Exemplu

bigcircle.in bigcircle.out
5
1.00 4.00
-0.50 -1.60
4.00 1.00
3.12 3.12
-1.60 -0.50
1.56

Explicație

Kids at points (−0.50, −1.60) and (−1.60, −0.50) are nearest and distance between them is 1.56.

Trebuie să te autentifici pentru a trimite soluții. Click aici

Indicii de rezolvare

Arată 5 categorii