#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 | #58470224 | Utilizator | |
Fișier | secvmax.cpp | Dimensiune | 1.75 KB |
Data încărcării | 08 Iunie 2025, 14:20 | Scor / rezultat | 100 puncte |
secvmax.cpp: In function 'int main()': secvmax.cpp:7:34: warning: unused variable 'lgsecv' [-Wunused-variable] int n, v[10005], st, secv = 0, lgsecv = 0, lmax = 0, dr, smax, drm, stm, sump; ^ secvmax.cpp:74:11: warning: 'stm' may be used uninitialized in this function [-Wmaybe-uninitialized] fout << stm << " " << drm; ^ secvmax.cpp:74:28: warning: 'drm' may be used uninitialized in this function [-Wmaybe-uninitialized] fout << stm << " " << drm; ^ secvmax.cpp:67:9: warning: 'smax' may be used uninitialized in this function [-Wmaybe-uninitialized] if (sump > smax) ^ secvmax.cpp:7:56: warning: 'dr' may be used uninitialized in this function [-Wmaybe-uninitialized] int n, v[10005], st, secv = 0, lgsecv = 0, lmax = 0, dr, smax, drm, stm, sump; ^ secvmax.cpp:7:20: warning: 'st' may be used uninitialized in this function [-Wmaybe-uninitialized] int n, v[10005], st, secv = 0, lgsecv = 0, lmax = 0, dr, smax, drm, stm, sump; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | ||
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | OK. | 20 | 20 | ||
Punctaj total | 100 |
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ă.