#922
Puncte
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 | #49109357 | Utilizator | |
Fișier | puncte.cpp | Dimensiune | 551 B |
Data încărcării | 15 Februarie 2024, 14:15 | Scor / rezultat | Eroare de compilare |
puncte.cpp:6:4: error: expected unqualified-id before ',' token int,x,y; ^ puncte.cpp: In function 'int main()': puncte.cpp:14:19: error: 'struct punct' has no member named 'x' cin>>v[i].x>>v[i].y; ^ puncte.cpp:14:27: error: 'struct punct' has no member named 'y' cin>>v[i].x>>v[i].y; ^ puncte.cpp:15:26: error: 'struct punct' has no member named 'x' v[i].d=sqrt(v[i].x*v[i].x+v[i].y*v[i].y): ^ puncte.cpp:15:33: error: 'struct punct' has no member named 'x' v[i].d=sqrt(v[i].x*v[i].x+v[i].y*v[i].y): ^ puncte.cpp:15:40: error: 'struct punct' has no member named 'y' v[i].d=sqrt(v[i].x*v[i].x+v[i].y*v[i].y): ^ puncte.cpp:15:47: error: 'struct punct' has no member named 'y' v[i].d=sqrt(v[i].x*v[i].x+v[i].y*v[i].y): ^ puncte.cpp:15:49: error: expected ';' before ':' token v[i].d=sqrt(v[i].x*v[i].x+v[i].y*v[i].y): ^ puncte.cpp:19:16: error: expected ')' before ']' token if(v[i]].d>dmax) ^ puncte.cpp:19:15: error: could not convert 'v[i]' from 'punct' to 'bool' if(v[i]].d>dmax) ^ puncte.cpp:19:16: error: expected primary-expression before ']' token if(v[i]].d>dmax) ^ puncte.cpp:19:16: error: expected ';' before ']' token puncte.cpp:25:35: error: 'setprecison' was not declared in this scope cout<<fixed<<setprecison(3)<<d<<" "; ^ puncte.cpp:25:38: error: 'd' was not declared in this scope cout<<fixed<<setprecison(3)<<d<<" "; ^
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ă.