Diferente pentru problema/stars intre reviziile #4 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="stars") ==
bq. You are the flower who I have chosen,
        and with care I have chosen you,
        If it were for me to choose again,
        Again I would choose you.
        The sky, it does have many stars,
        But I want only one of them,
        There are flowers in the whole world,
bq. You are the flower who I have chosen, \\
        and with care I have chosen you, \\
        If it were for me to choose again, \\
        Again I would choose you. \\
 
        The sky, it does have many stars, \\
        But I want only one of them, \\
        There are flowers in the whole world, \\
        But I want only my flower.
(Nicolae Guta)
Nicolae vede $N$ stele in fata sa. Acestea se pot modela ca niste puncte 2-dimensionale, fiecare avand coordonate intregi intre $-10^8^$ si $10^8^$. Acum trebuie sa decida pozitia si marimea _florii gravitationale centrale ale universului_. Aceasta se poate modela ca un cerc 2-dimensional, cu centrul intr-un punct intreg. Vrea sa faca acest lucru astfel incat exact jumatate din stele sunt in interiorul _florii gravitationale centrale ale universului_, si exact jumatate din stele sunt in exteriorul acestuia.
Mai formal, se dau $N$ puncte $(x[~i~], y[~i~])$. Sa se gaseasca trei numere intregi $x, y, r$ astfel incat $-10^8^ ≤ x, y ≤ 10^8^$, $0 ≤ r ≤ 10^18^$ si pentru exact $N / 2$ puncte $(x', y')$ dintre cele $N$ satisfac $(x - x')^2^ + (y - y')^2^ ≤ r$, si exact $N / 2$ puncte $(x', y')$ dintre cele $N$ satisfac $(x - x')^2^ + (y - y')^2^ > r$. *Observati ca $r$ nu este raza cercului, ci patratul razei*.
 
h2. Date de intrare
Fişierul de intrare $stars.in$ va contine, pe primul rand, numarul $T$ de teste.
Fiecare test incepe cu un numar natural $N$, cu semnificatia din enunt. Urmeaza $N$ linii, iar cea e a $i$-a linie contine valorile $x[~i~], y[~i~]$.
Fişierul de intrare $stars.in$ ...
h2. Date de ieşire
În fişierul de ieşire $stars.out$ sa se afiseze, pe cate $T$ randuri, raspunsurile pentru fiecare test. Pentru fiecare test sa se afiseze trei valori $x, y, r$ care satisfac conditiile din enunt.
În fişierul de ieşire $stars.out$ ...
h2. Restricţii
* $1 ≤ T ≤ 100.000$
* $1 ≤ N ≤ 100.000$
* Suma valorilor lui $N$ nu depasesc $100.000$ intr-un fisier.
* $N$ e par.
* $-10^8^ ≤ x[~i~], y[~i~] ≤ 10^8^$.
* $... ≤ ... ≤ ...$
h2. Exemplu
table(example). |_. stars.in |_. stars.out |
| 2
2
0 -1
0 1
4
0 0
0 1
1 1
1 0
| 1 -3 5
2 0 2
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
|
h3. Explicaţie
 
...
== include(page="template/taskfooter" task_id="stars") ==

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.