#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 | #22872641 | Utilizator | |
Fișier | intersectiesegmente.cpp | Dimensiune | 347 B |
Data încărcării | 10 Mai 2020, 18:06 | Scor / rezultat | Eroare de compilare |
intersectiesegmente.cpp:8:2: error: stray '\302' in program if(((x1*(y3-y2)-y3*x2+y2*x2-y1*(x3-x2)+x3*y2-x2*y2)==0) && ((x1<=x2) && (x1>=x3)) || ((x1<=x3) && (x1>=x2))) ^ intersectiesegmente.cpp:8:2: error: stray '\240' in program intersectiesegmente.cpp: In function 'int main()': intersectiesegmente.cpp:8:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(((x1*(y3-y2)-y3*x2+y2*x2-y1*(x3-x2)+x3*y2-x2*y2)==0) && ((x1<=x2) && (x1>=x3)) || ((x1<=x3) && (x1>=x2))) ^
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ă.