#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 | #64646402 | Utilizator | |
| Fișier | secvcresc.cpp | Dimensiune | 672 B |
| Data încărcării | 20 Mai 2026, 11:43 | Scor/rezultat | 70 puncte |
In file included from /usr/include/c++/13/iostream:41, from secvcresc.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at secvcresc.cpp:31:20: /usr/include/c++/13/ostream:204:25: warning: ‘dr’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ secvcresc.cpp: In function ‘int main()’: secvcresc.cpp:8:29: note: ‘dr’ was declared here 8 | long long lmax=0, lc=1, dr, st, v, i, n,ant; | ^~ In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at secvcresc.cpp:31:11: /usr/include/c++/13/ostream:204:25: warning: ‘st’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ secvcresc.cpp: In function ‘int main()’: secvcresc.cpp:8:33: note: ‘st’ was declared here 8 | long long lmax=0, lc=1, dr, st, v, i, n,ant; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | ||
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| Punctaj total | 70 | |||||
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ă.