#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 | #22846301 | Utilizator | |
Fișier | distantapunctsegment.cpp | Dimensiune | 688 B |
Data încărcării | 08 Mai 2020, 15:36 | Scor / rezultat | Eroare de compilare |
distantapunctsegment.cpp:10:12: error: 'double y1' redeclared as different kind of symbol double x1, y1, x2, y2, x3, y3, a, b, c; ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from distantapunctsegment.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ distantapunctsegment.cpp: In function 'int main()': distantapunctsegment.cpp:14:5: error: 'cin' was not declared in this scope cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ^ distantapunctsegment.cpp:19:22: error: invalid operands of types 'double' and 'double(double)throw ()' to binary 'operator*' double d=(a*x1+b*y1+c)/aa; ^ distantapunctsegment.cpp:21:10: error: invalid operands of types 'double(double)throw ()' and 'double' to binary 'operator-' a=y1-y3; ^ distantapunctsegment.cpp:24:10: error: invalid operands of types 'double' and 'double(double)throw ()' to binary 'operator-' a=y2-y1; ^ distantapunctsegment.cpp:29:5: error: 'cout' was not declared in this scope cout << fixed << setprecision(2) << (int)(d*100)/100.0; ^
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ă.