#166
Să se determine cea mai lungă secvență de elemente pare dintr-un vector.
| Problema | SecvMax | Operații I/O |
secvmax.in/secvmax.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64646066 | Utilizator | |
| Fișier | secvmax.cpp | Dimensiune | 718 B |
| Data încărcării | 20 Mai 2026, 11:33 | Scor/rezultat | 80 puncte |
In file included from /usr/include/c++/13/istream:41, from /usr/include/c++/13/fstream:40, from secvmax.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 secvmax.cpp:36:11: /usr/include/c++/13/ostream:204:25: warning: ‘st’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ secvmax.cpp: In function ‘int main()’: secvmax.cpp:7:27: note: ‘st’ was declared here 7 | long long lmax=0,lc=0,st,dr,v,i,n,s=0,smax=0; | ^~ 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 secvmax.cpp:36:20: /usr/include/c++/13/ostream:204:25: warning: ‘dr’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ secvmax.cpp: In function ‘int main()’: secvmax.cpp:7:30: note: ‘dr’ was declared here 7 | long long lmax=0,lc=0,st,dr,v,i,n,s=0,smax=0; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | ||
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SecvMax 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ă.