#934
DistantaPunctSegment
Se dau în plan, un punct și un segment. Să se determine distanța minimă de la punctul dat la un punct aparținând segmentului.
Problema | DistantaPunctSegment | Operații I/O |
![]() distantapunctsegment.in /distantapunctsegment.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #26062448 | Utilizator | |
Fișier | distantapunctsegment.cpp | Dimensiune | 337 B |
Data încărcării | 23 Noiembrie 2020, 12:13 | Scor / rezultat | Eroare de compilare |
distantapunctsegment.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include ^ distantapunctsegment.cpp:4:1: error: 'ifstream' does not name a type ifstream f("punctsegment.in"); ^ distantapunctsegment.cpp:5:1: error: 'ofstream' does not name a type ofstream g("punctsegment.out"); ^ distantapunctsegment.cpp: In function 'int main()': distantapunctsegment.cpp:9:1: error: 'f' was not declared in this scope f>>x1>>y1>>x2>>y2>>x3>>y3; ^ distantapunctsegment.cpp:10:55: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if((x1*(y3-y2)-y3*x2+y2*x2-y1*(x3-x2)+x3*y2-x2*y2)==0 and ( ( x1 <=x2 ) && (x1 >= x3 )) || ( (x1 <= x3 ) && (x1 >= x2 ))) g<<"DA"; ^ distantapunctsegment.cpp:10:124: error: 'g' was not declared in this scope if((x1*(y3-y2)-y3*x2+y2*x2-y1*(x3-x2)+x3*y2-x2*y2)==0 and ( ( x1 <=x2 ) && (x1 >= x3 )) || ( (x1 <= x3 ) && (x1 >= x2 ))) g<<"DA"; ^ distantapunctsegment.cpp:11:6: error: 'g' was not declared in this scope else g<<"NU"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DistantaPunctSegment 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ă.