#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 | #29649426 | Utilizator | |
Fișier | nrlipsa.cpp | Dimensiune | 531 B |
Data încărcării | 13 Mai 2021, 18:07 | Scor / rezultat | Eroare de compilare |
nrlipsa.cpp: In function 'int main()': nrlipsa.cpp:20:16: error: reference to 'max' is ambiguous if(max==0) ^ nrlipsa.cpp:9:17: note: candidates are: int max int v[1000],n,i,max,max1; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from nrlipsa.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ nrlipsa.cpp:21:17: error: reference to 'max' is ambiguous max = i; ^ nrlipsa.cpp:9:17: note: candidates are: int max int v[1000],n,i,max,max1; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from nrlipsa.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ nrlipsa.cpp:30:16: error: reference to 'max' is ambiguous fout <<max << " " <<max1; ^ nrlipsa.cpp:9:17: note: candidates are: int max int v[1000],n,i,max,max1; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from nrlipsa.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^
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ă.