#181
Să se determine cea mai lungă secvență de elemente ordonate strict crescător dintr-un vector.
Problema | SecvCresc | Operații I/O |
![]() secvcresc.in /secvcresc.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57033383 | Utilizator | |
Fișier | secvcresc.cpp | Dimensiune | 677 B |
Data încărcării | 13 Martie 2025, 15:16 | Scor / rezultat | Eroare de compilare |
secvcresc.cpp:4:28: error: no matching function for call to 'std::basic_istream<char>::basic_istream(const char [13])' istream fin("secvcresc.in"); ^ secvcresc.cpp:4:28: note: candidates are: In file included from /usr/include/c++/4.8/iostream:40:0, from secvcresc.cpp:1: /usr/include/c++/4.8/istream:606:7: note: std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char; _Traits = std::char_traits<char>] basic_istream() ^ /usr/include/c++/4.8/istream:606:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/istream:93:7: note: std::basic_istream<_CharT, _Traits>::basic_istream(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_istream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/istream:93:7: note: no known conversion for argument 1 from 'const char [13]' to 'std::basic_istream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' secvcresc.cpp:5:15: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("secvcresc.out"); ^ secvcresc.cpp: In function 'int main()': secvcresc.cpp:8:41: warning: unused variable 'j' [-Wunused-variable] int n,v[1001],i,l=1,lmax=0,pmax,j; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SecvCresc 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ă.