#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 | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50591964 | Utilizator | |
Fișier | cercuri.cpp | Dimensiune | 622 B |
Data încărcării | 16 Aprilie 2024, 12:45 | Scor / rezultat | Eroare de compilare |
cercuri.cpp:8:19: error: 'long double y1' redeclared as different kind of symbol long double r1,x1,y1,r2,x2,y2; ^ 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/iostream:38, from cercuri.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ cercuri.cpp: In function 'int main()': cercuri.cpp:11:11: 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:12:32: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator==' if (r1==r2 && x1==x2 && y1==y2) ^ cercuri.cpp:14:34: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1+r2)*(r1+r2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1-r2)*(r1-r2) ) ^ cercuri.cpp:14:42: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1+r2)*(r1+r2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1-r2)*(r1-r2) ) ^ cercuri.cpp:14:86: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1+r2)*(r1+r2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1-r2)*(r1-r2) ) ^ cercuri.cpp:14:94: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1+r2)*(r1+r2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==(r1-r2)*(r1-r2) ) ^ cercuri.cpp:16:34: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^ cercuri.cpp:16:42: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^ cercuri.cpp:16:101: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^ cercuri.cpp:16:109: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^ cercuri.cpp:16:136: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^ cercuri.cpp:16:144: error: invalid operands of types 'double(double)throw ()' and 'long double' to binary 'operator-' else if ( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2) || (r1-r2)*(r1-r2)>(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) || (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)==0) ^
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ă.