#930
IntersectieSegmente
Se dau două segmente în plan, specificate prin coordonatele capetelor. Să se verifice dacă au cel puțin un punct comun.
Problema | IntersectieSegmente | Operații I/O |
![]() intersectiesegmente.in /intersectiesegmente.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55593309 | Utilizator | |
Fișier | intersectiesegmente.cpp | Dimensiune | 2.15 KB |
Data încărcării | 20 Ianuarie 2025, 08:31 | Scor / rezultat | Eroare de compilare |
intersectiesegmente.cpp: In function 'bool segment_intersection(POINT, POINT, POINT, POINT)': intersectiesegmente.cpp:63:45: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(aux == -1 && (point_in_box(P3,P1,P2) && point_in_box(P4,P1,P2) || point_in_box(P1,P3,P4) && point_in_box(P2,P3,P4))) ^ intersectiesegmente.cpp:66:34: error: could not convert 'I' from 'POINT_real' to 'POINT' return point_in_box(I, P1, P2) && point_in_box(I, P3, P4); ^ intersectiesegmente.cpp:66:61: error: could not convert 'I' from 'POINT_real' to 'POINT' return point_in_box(I, P1, P2) && point_in_box(I, P3, P4); ^ intersectiesegmente.cpp:68:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema IntersectieSegmente 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ă.