#922
Se dau coordonatele carteziene a n puncte în plan. Să se determine distanța maximă dintre un punct dat și originea sistemului de coordonate și numărul de puncte situate la acea distanță față de origine.
| Problema | Puncte | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64430073 | Utilizator | |
| Fișier | puncte.cpp | Dimensiune | 849 B |
| Data încărcării | 06 Mai 2026, 13:59 | Scor/rezultat | Eroare de compilare |
puncte.cpp: In function ‘int main()’: puncte.cpp:3:11: error: ‘cin’ was not declared in this scope 3 | if (!(cin >> n)) return 0; | ^~~ puncte.cpp:10:9: error: ‘cin’ was not declared in this scope 10 | cin >> x >> y; | ^~~ puncte.cpp:13:20: error: ‘sqrt’ was not declared in this scope 13 | double d = sqrt((long long)x * x + (long long)y * y); | ^~~~ puncte.cpp:22:18: error: ‘abs’ was not declared in this scope 22 | else if (abs(d - dist_max) < 1e-9) { | ^~~ puncte.cpp:28:5: error: ‘cout’ was not declared in this scope 28 | cout << fixed << setprecision(3) << dist_max << " " << contor << endl; | ^~~~ puncte.cpp:28:13: error: ‘fixed’ was not declared in this scope 28 | cout << fixed << setprecision(3) << dist_max << " " << contor << endl; | ^~~~~ puncte.cpp:28:22: error: ‘setprecision’ was not declared in this scope 28 | cout << fixed << setprecision(3) << dist_max << " " << contor << endl; | ^~~~~~~~~~~~ puncte.cpp:28:70: error: ‘endl’ was not declared in this scope 28 | cout << fixed << setprecision(3) << dist_max << " " << contor << endl; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Puncte face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.