#931
Se dau puncte distincte în plan. Asociem fiecărui punct semidreapta care pornește din originea sistemului de coordonate și trece prin acel punct. Să se afișeze punctele în ordine crescătoare a unghiului pe care semidreapta asociată îl face cu semidreapta spre plus infinit a axei OX. Dacă două unghiuri sunt egale se va afișa punctul cel mai apropiat de origine.
| Problema | SortareUnghi | Operații I/O |
sortareunghi.in/sortareunghi.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64461473 | Utilizator | |
| Fișier | sortareunghi.cpp | Dimensiune | 14.01 KB |
| Data încărcării | 08 Mai 2026, 09:27 | Scor/rezultat | Eroare de compilare |
sortareunghi.cpp:251:42: error: stray ‘#’ in program 251 | double cos2 = teorema_cosinus(v[j]a#include <cmath> | ^ sortareunghi.cpp: In function ‘int prob_934_70pcte()’: sortareunghi.cpp:233:1: warning: no return statement in function returning non-void [-Wreturn-type] 233 | } | ^ sortareunghi.cpp: In function ‘int main()’: sortareunghi.cpp:251:41: error: expected ‘)’ before ‘a’ 251 | double cos2 = teorema_cosinus(v[j]a#include <cmath> | ~ ^ | ) sortareunghi.cpp:266:51: error: a function-definition is not allowed here before ‘{’ token 266 | double distanta(struct punct p1, struct punct p2) { | ^ sortareunghi.cpp:269:65: error: a function-definition is not allowed here before ‘{’ token 269 | double distanta_punct_dreapta(struct punct p, struct dreapta d) { | ^ sortareunghi.cpp:272:49: error: a function-definition is not allowed here before ‘{’ token 272 | double arie_heron(double a, double b, double c) { | ^ sortareunghi.cpp:276:68: error: a function-definition is not allowed here before ‘{’ token 276 | double panta_dreptei_prin2puncte(struct punct p1, struct punct p2) { | ^ sortareunghi.cpp:279:66: error: a function-definition is not allowed here before ‘{’ token 279 | struct dreapta ecuatia_dreptei(struct punct p1, struct punct p2) { | ^ sortareunghi.cpp:297:75: error: a function-definition is not allowed here before ‘{’ token 297 | double teorema_cosinus(struct punct p1, struct punct p2, struct punct p3) { | ^ sortareunghi.cpp:376:21: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 376 | int prob_929__90pcte() { | ^~ sortareunghi.cpp:376:21: note: remove parentheses to default-initialize a variable 376 | int prob_929__90pcte() { | ^~ | -- sortareunghi.cpp:376:21: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:376:24: error: a function-definition is not allowed here before ‘{’ token 376 | int prob_929__90pcte() { | ^ sortareunghi.cpp:395:23: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 395 | int prob_1921_100pcete() { | ^~ sortareunghi.cpp:395:23: note: remove parentheses to default-initialize a variable 395 | int prob_1921_100pcete() { | ^~ | -- sortareunghi.cpp:395:23: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:395:26: error: a function-definition is not allowed here before ‘{’ token 395 | int prob_1921_100pcete() { | ^ sortareunghi.cpp:410:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 410 | int prob_930_80pcte() { | ^~ sortareunghi.cpp:410:20: note: remove parentheses to default-initialize a variable 410 | int prob_930_80pcte() { | ^~ | -- sortareunghi.cpp:410:20: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:410:23: error: a function-definition is not allowed here before ‘{’ token 410 | int prob_930_80pcte() { | ^ sortareunghi.cpp:448:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 448 | int prob_933_80pcte() { | ^~ sortareunghi.cpp:448:20: note: remove parentheses to default-initialize a variable 448 | int prob_933_80pcte() { | ^~ | -- sortareunghi.cpp:448:20: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:448:23: error: a function-definition is not allowed here before ‘{’ token 448 | int prob_933_80pcte() { | ^ sortareunghi.cpp:461:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 461 | int prob_934_70pcte() { | ^~ sortareunghi.cpp:461:20: note: remove parentheses to default-initialize a variable 461 | int prob_934_70pcte() { | ^~ | -- sortareunghi.cpp:461:20: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:461:23: error: a function-definition is not allowed here before ‘{’ token 461 | int prob_934_70pcte() { | ^ sortareunghi.cpp:485:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 485 | int main() { | ^~ sortareunghi.cpp:485:9: note: remove parentheses to default-initialize a variable 485 | int main() { | ^~ | -- sortareunghi.cpp:485:9: note: or replace parentheses with braces to value-initialize a variable sortareunghi.cpp:485:12: error: a function-definition is not allowed here before ‘{’ token 485 | int main() { | ^ sortareunghi.cpp:519:1: error: expected primary-expression before ‘,’ token 519 | , O, P); | ^ sortareunghi.cpp:241:25: warning: unused variable ‘c’ [-Wunused-variable] 241 | struct punct v[1000], c[1000]; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortareUnghi 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ă.