| 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 | #63274245 | Utilizator | |
| Fișier | numere_mari.cpp | Dimensiune | 4.57 KB |
| Data încărcării | 24 Februarie 2026, 13:56 | Scor/rezultat | Eroare de compilare |
numere_mari.cpp:30:1: error: 'big_int' does not name a type big_int::big_int() { sign = 1; digits = "0"; } ^ numere_mari.cpp:32:1: error: 'big_int' does not name a type big_int::big_int(string s) { ^ numere_mari.cpp:42:1: error: 'big_int' does not name a type big_int::big_int(int n) { ^ numere_mari.cpp:52:1: error: 'big_int' does not name a type big_int::operator string() const { ^ numere_mari.cpp:59:25: error: 'big_int' does not name a type bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:59: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:59:43: error: 'big_int' does not name a type bool operator == (const big_int& a, const big_int& b) { ^ numere_mari.cpp:59: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:59: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:63:24: error: 'big_int' does not name a type bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:63: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:63:42: error: 'big_int' does not name a type bool operator < (const big_int& a, const big_int& b) { ^ numere_mari.cpp:63: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:63: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:73:1: error: 'big_int' does not name a type big_int big_int::abs() const { big_int res = *this; res.sign = 1; return res; } ^ numere_mari.cpp:75:1: error: 'big_int' does not name a type big_int big_int::operator - () const { ^ numere_mari.cpp:80:1: error: 'big_int' does not name a type big_int big_int::operator + (const big_int& b) const { ^ numere_mari.cpp:97:1: error: 'big_int' does not name a type big_int big_int::operator - (const big_int& b) const { return *this + (-b); } ^ 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:118:1: error: 'big_int' does not name a type big_int big_int::operator / (const big_int& b) const { ^ numere_mari.cpp:135:1: error: 'big_int' does not name a type big_int big_int::operator % (const big_int& b) const { ^ numere_mari.cpp:142: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:143:37: error: 'big_int' was not declared in this scope string s; in >> s; n = big_int(s); return in; ^ numere_mari.cpp: At global scope: numere_mari.cpp:146:43: error: 'big_int' does not name a type ostream& operator << (ostream& out, const big_int& n) { ^ numere_mari.cpp:146: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:147:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive] out << (string)n; return out; ^ 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:152:5: error: 'big_int' was not declared in this scope big_int a = 96, b("420"); ^ numere_mari.cpp:152:13: error: expected ';' before 'a' big_int a = 96, b("420"); ^ numere_mari.cpp:153:12: error: 'a' was not declared in this scope cin >> a >> b; ^ numere_mari.cpp:153: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ă.