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