#929
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 | #63862770 | Utilizator | |
| Fișier | punctsegment.cpp | Dimensiune | 442 B |
| Data încărcării | 23 Martie 2026, 13:19 | Scor/rezultat | Eroare de compilare |
punctsegment.cpp: In function 'int main()': punctsegment.cpp:11:19: error: two or more data types in declaration of 'x1' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:11:22: error: two or more data types in declaration of 'y1' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:11:25: error: two or more data types in declaration of 'x2' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:11:28: error: two or more data types in declaration of 'y2' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:11:31: error: two or more data types in declaration of 'x3' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:11:34: error: two or more data types in declaration of 'y3' double double x1,y1,x2,y2,x3,y3; ^ punctsegment.cpp:12:12: error: 'x1' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ punctsegment.cpp:12:24: error: 'x2' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ punctsegment.cpp:12:30: error: 'y2' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ punctsegment.cpp:12:36: error: 'x3' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ punctsegment.cpp:12:42: error: 'y3' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ punctsegment.cpp:14:19: error: two or more data types in declaration of 'r' double double r=(x1*y2)+(x2*y3)+(x3*y1)-(y2*x3)-(y3*x1)-(y1*x2); ^ punctsegment.cpp:15:8: error: 'r' was not declared in this scope if(r==0) cout << "DA"; ^
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ă.