#239
NrLipsa
Se dau mai multe numere naturale cu cel mult 9
cifre fiecare. Să se determine cele mai mari două numere de 3
cifre care nu se găsesc printre numerele date.
Variante Bacalaureat 2009
Problema | NrLipsa | Operații I/O |
nrlipsa.in /nrlipsa.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53687702 | Utilizator | |
Fișier | nrlipsa.cpp | Dimensiune | 482 B |
Data încărcării | 08 Noiembrie 2024, 13:22 | Scor / rezultat | Eroare de compilare |
nrlipsa.cpp:3:7: error: expected nested-name-specifier before 'mamespace' using mamespace std; ^ nrlipsa.cpp:3:7: error: 'mamespace' has not been declared nrlipsa.cpp:3:17: error: expected ';' before 'std' using mamespace std; ^ nrlipsa.cpp:3:17: error: 'std' does not name a type nrlipsa.cpp: In function 'int main()': nrlipsa.cpp:6:5: error: 'ifstream' was not declared in this scope ifstream cin("nrlipsa.in"); ^ nrlipsa.cpp:6:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from nrlipsa.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ nrlipsa.cpp:6:14: error: expected ';' before 'cin' ifstream cin("nrlipsa.in"); ^ nrlipsa.cpp:7:5: error: 'ofstream' was not declared in this scope ofstream cout("nrlipsa.out") ^ nrlipsa.cpp:7:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from nrlipsa.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ nrlipsa.cpp:7:14: error: expected ';' before 'cout' ofstream cout("nrlipsa.out") ^ nrlipsa.cpp:9:11: error: 'cin' was not declared in this scope while(cin>>a) ^ nrlipsa.cpp:9:11: note: suggested alternative: In file included from nrlipsa.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ nrlipsa.cpp:9:16: error: 'a' was not declared in this scope while(cin>>a) ^ nrlipsa.cpp:16:12: error: 'max1' was not declared in this scope if(max1==0)max1=i; ^ nrlipsa.cpp:17:17: error: 'max2' was not declared in this scope else if(max2==0)max2=i; ^ nrlipsa.cpp:20:8: error: 'max1' was not declared in this scope if(max1==0 || max2==0) ^ nrlipsa.cpp:20:19: error: 'max2' was not declared in this scope if(max1==0 || max2==0) ^ nrlipsa.cpp:21:5: error: 'cout' was not declared in this scope cout<<"nu"; ^ nrlipsa.cpp:21:5: note: suggested alternative: In file included from nrlipsa.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ nrlipsa.cpp:23:5: error: 'cout' was not declared in this scope cout<<max1<<" "<<max2; ^ nrlipsa.cpp:23:5: note: suggested alternative: In file included from nrlipsa.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrLipsa 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ă.