#274
3minime
Se dau n
numere naturale. Determinaţi cele mai mici trei numere dintre cele date.
Variante Bacalaureat 2009
Problema | 3minime | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54189965 | Utilizator | |
Fișier | minime.cpp | Dimensiune | 323 B |
Data încărcării | 21 Noiembrie 2024, 17:50 | Scor / rezultat | Eroare de compilare |
minime.cpp: In function 'int main()': minime.cpp:8:17: error: cannot bind 'std::istream {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' cin>>a[i]; ^ In file included from /usr/include/c++/4.8/sstream:38:0, 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 minime.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::vector<int>]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ minime.cpp:10:20: error: request for member 'begin' in 'a', which is of non-class type 'std::vector<int> [101]' auto first = a.begin(); ^ minime.cpp:11:19: error: request for member 'end' in 'a', which is of non-class type 'std::vector<int> [101]' auto last = a.end(); ^ minime.cpp:14:18: error: cannot bind 'std::ostream {aka std::basic_ostream<char>}' lvalue to 'std::basic_ostream<char>&&' cout<<a[i]<<" "; ^ In file included from /usr/include/c++/4.8/istream:39:0, 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 minime.cpp:1: /usr/include/c++/4.8/ostream:602:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::vector<int>]' operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 3minime 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ă.