#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 | #57290558 | Utilizator | |
Fișier | punctsegment.cpp | Dimensiune | 291 B |
Data încărcării | 24 Martie 2025, 15:44 | Scor / rezultat | 0 puncte |
punctsegment.cpp: In function 'int main()': punctsegment.cpp:11:17: warning: 'b.point::x' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:14: note: 'b.point::x' was declared here point a, b, c; ^ punctsegment.cpp:11:17: warning: 'a.point::x' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:11: note: 'a.point::x' was declared here point a, b, c; ^ punctsegment.cpp:11:29: warning: 'c.point::y' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:17: note: 'c.point::y' was declared here point a, b, c; ^ punctsegment.cpp:11:29: warning: 'a.point::y' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:11: note: 'a.point::y' was declared here point a, b, c; ^ punctsegment.cpp:11:43: warning: 'c.point::x' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:17: note: 'c.point::x' was declared here point a, b, c; ^ punctsegment.cpp:11:55: warning: 'b.point::y' is used uninitialized in this function [-Wuninitialized] return (b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y); ^ punctsegment.cpp:16:14: note: 'b.point::y' was declared here point a, b, c; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
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ă.