| Problema | Numere Mari | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63274184 | Utilizator | |
| Fișier | numere_mari.cpp | Dimensiune | 4.88 KB |
| Data încărcării | 24 Februarie 2026, 13:55 | Scor/rezultat | Eroare de compilare |
numere_mari.cpp:33:1: error: 'big_int' does not name a type big_int::big_int() { ^ numere_mari.cpp:38:1: error: 'big_int' does not name a type big_int::big_int(string s) { ^ numere_mari.cpp:51:1: error: 'big_int' does not name a type big_int::big_int(int n) { ^ numere_mari.cpp:64:1: error: 'big_int' does not name a type big_int::operator string() const { ^ numere_mari.cpp:71:25: error: 'big_int' does not name a type bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:71:34: error: ISO C++ forbids declaration of 'a' with no type [-fpermissive] bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:71:43: error: 'big_int' does not name a type bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:71:52: error: ISO C++ forbids declaration of 'b' with no type [-fpermissive] bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:71:53: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:75:24: error: 'big_int' does not name a type bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:75:33: error: ISO C++ forbids declaration of 'a' with no type [-fpermissive] bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:75:42: error: 'big_int' does not name a type bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:75:51: error: ISO C++ forbids declaration of 'b' with no type [-fpermissive] bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:75:52: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:86:1: error: 'big_int' does not name a type big_int big_int::abs() const { ^ numere_mari.cpp:92:1: error: 'big_int' does not name a type big_int big_int::operator - () const { ^ numere_mari.cpp:99:1: error: 'big_int' does not name a type big_int big_int::operator + (const big_int& b) const { ^ numere_mari.cpp:116:1: error: 'big_int' does not name a type big_int big_int::operator - (const big_int& b) const { ^ numere_mari.cpp:120:1: error: 'big_int' does not name a type big_int big_int::operator * (const big_int& b) const { ^ numere_mari.cpp:141:1: error: 'big_int' does not name a type big_int big_int::operator / (const big_int& b) const { ^ numere_mari.cpp:161:1: error: 'big_int' does not name a type big_int big_int::operator % (const big_int& b) const { ^ numere_mari.cpp:168:36: error: 'big_int' has not been declared istream& operator >> (istream& in, big_int& n) { ^ numere_mari.cpp: In function 'std::istream& operator>>(std::istream&, int&)': numere_mari.cpp:170:18: error: 'big_int' was not declared in this scope n = big_int(s); ^ numere_mari.cpp: At global scope: numere_mari.cpp:174:43: error: 'big_int' does not name a type ostream& operator << (ostream& out, const big_int& n) { ^ numere_mari.cpp:174:52: error: ISO C++ forbids declaration of 'n' with no type [-fpermissive] ostream& operator << (ostream& out, const big_int& n) { ^ numere_mari.cpp: In function 'std::ostream& operator<<(std::ostream&, const int&)': numere_mari.cpp:175:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive] out << (string)n; ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from numere_mari.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:490:7: error: initializing argument 1 of 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' [-fpermissive] basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); ^ numere_mari.cpp: In function 'int main()': numere_mari.cpp:181:5: error: 'big_int' was not declared in this scope big_int a = 96, b("420"); ^ numere_mari.cpp:181:13: error: expected ';' before 'a' big_int a = 96, b("420"); ^ numere_mari.cpp:182:12: error: 'a' was not declared in this scope cin >> a >> b; ^ numere_mari.cpp:182:17: error: 'b' was not declared in this scope cin >> a >> b; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere Mari face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.