#929
PunctSegment
Se dau un punct și un segment în plan. Să se verifice dacă punctul se găsește pe segment.
Problema | PunctSegment | Operații I/O |
punctsegment.in /punctsegment.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #7224012 | Utilizator | |
Fișier | punctsegment.cpp | Dimensiune | 320 B |
Data încărcării | 29 Noiembrie 2017, 04:23 | Scor / rezultat | Eroare de compilare |
punctsegment.cpp:2:1: error: 'ifstream' does not name a type ifstream f("punctsegment.in"); ^ punctsegment.cpp:3:1: error: 'ofstream' does not name a type ofstream g("punctsegment.out"); ^ punctsegment.cpp: In function 'int main()': punctsegment.cpp:7:1: error: 'f' was not declared in this scope f>>x1>>y1>>x2>>y2>>x3>>y3; ^ punctsegment.cpp:8:57: 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 ))) g<<"DA"; ^ punctsegment.cpp:8:122: error: 'g' was not declared in this scope if(((x1*(y3-y2)-y3*x2+y2*x2-y1*(x3-x2)+x3*y2-x2*y2)==0) && ((x1 <=x2) && (x1 >= x3 )) || ( (x1 <= x3 ) && (x1 >= x2 ))) g<<"DA"; ^ punctsegment.cpp:9:6: error: 'g' was not declared in this scope else g<<"NU"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PunctSegment 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ă.