#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 | #64391024 | Utilizator | |
| Fișier | puncte.cpp | Dimensiune | 700 B |
| Data încărcării | 04 Mai 2026, 21:37 | Scor/rezultat | Eroare de compilare |
puncte.cpp:11:29: error: ‘v’ was not declared in this scope 11 | float distanta (coordonate *v, int n, int c) | ^ puncte.cpp:11:32: error: expected primary-expression before ‘int’ 11 | float distanta (coordonate *v, int n, int c) | ^~~ puncte.cpp:11:39: error: expected primary-expression before ‘int’ 11 | float distanta (coordonate *v, int n, int c) | ^~~ puncte.cpp:11:44: error: expression list treated as compound expression in initializer [-fpermissive] 11 | float distanta (coordonate *v, int n, int c) | ^ puncte.cpp: In function ‘int main()’: puncte.cpp:37:15: error: expected ‘;’ before ‘v’ 37 | coordonate v[101]; | ^~ | ; puncte.cpp:37:5: warning: statement has no effect [-Wunused-value] 37 | coordonate v[101]; | ^~~~~~~~~~ puncte.cpp:40:14: error: ‘v’ was not declared in this scope 40 | cin>>v[i].x>>v[i].y; | ^ puncte.cpp:43:20: error: ‘v’ was not declared in this scope 43 | cout<<distanta(v, n, c); | ^ puncte.cpp:43:19: error: ‘distanta’ cannot be used as a function 43 | cout<<distanta(v, n, c); | ~~~~~~~~^~~~~~~~~
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ă.