#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 | #52060028 | Utilizator | |
Fișier | nrlipsa.cpp | Dimensiune | 695 B |
Data încărcării | 17 Septembrie 2024, 20:50 | Scor / rezultat | Eroare de compilare |
nrlipsa.cpp: In function 'int main()': nrlipsa.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n; ^ nrlipsa.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("nrlipsa.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from nrlipsa.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ nrlipsa.cpp:12:11: error: reference to 'cin' is ambiguous while(cin >> x) { ^ nrlipsa.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("nrlipsa.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from nrlipsa.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ nrlipsa.cpp:28:9: error: reference to 'cout' is ambiguous cout << a << " " << b; ^ nrlipsa.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("nrlipsa.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from nrlipsa.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ nrlipsa.cpp:31:9: error: reference to 'cout' is ambiguous cout << "NU"; ^ nrlipsa.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("nrlipsa.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from nrlipsa.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ nrlipsa.cpp:33:9: error: reference to 'cout' is ambiguous cout << "NU EXISTA"; ^ nrlipsa.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("nrlipsa.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from nrlipsa.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream 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ă.