#3207
Cercuri
Se dau coordonatele şi razele a două cercuri. Să se determine în câte puncte se intersectează cele două cercuri.
Problema | Cercuri | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57397430 | Utilizator | |
Fișier | cercuri.cpp | Dimensiune | 505 B |
Data încărcării | 29 Martie 2025, 10:08 | Scor / rezultat | Eroare de compilare |
cercuri.cpp: In function 'int main()': cercuri.cpp:8:12: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' cin>>r1>>x1>>y1>>r2>>x2>>y2; ^ In file included from /usr/include/c++/4.8/iostream:40:0, from cercuri.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ cercuri.cpp:10:22: error: invalid operands of types 'double(double)throw ()' and 'double' to binary 'operator==' if(x1==x2 && y1==y2 && r1==r2) ^ cercuri.cpp:14:39: error: invalid operands of types 'double' and 'double(double)throw ()' to binary 'operator-' dist=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); ^ cercuri.cpp:14:47: error: invalid operands of types 'double' and 'double(double)throw ()' to binary 'operator-' dist=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); ^ cercuri.cpp:7:15: warning: unused variable 'z1' [-Wunused-variable] double x1,z1,r1,x2,y2,r2,dist; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cercuri 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ă.