#166
SecvMax
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 | #21109873 | Utilizator | |
Fișier | secvmax.cpp | Dimensiune | 663 B |
Data încărcării | 20 Februarie 2020, 10:39 | Scor / rezultat | Eroare de compilare |
secvmax.cpp:5:26: error: redefinition of 'int i' int n,i,l,lmax,pozi,pozf,i,max; ^ secvmax.cpp:5:7: error: 'int i' previously declared here int n,i,l,lmax,pozi,pozf,i,max; ^ secvmax.cpp: In function 'int main()': secvmax.cpp:11:14: error: 'x' was not declared in this scope fin>>x; ^ secvmax.cpp:15:13: error: 's' was not declared in this scope s=s+x; ^ secvmax.cpp:19:37: error: 's' was not declared in this scope if(l>lmax || l==lmax && s>smax) ^ secvmax.cpp:19:39: error: 'smax' was not declared in this scope if(l>lmax || l==lmax && s>smax) ^ secvmax.cpp:26:13: error: 's' was not declared in this scope s=0; ^ secvmax.cpp:29:28: error: 's' was not declared in this scope if(l>lmax|| l==lmax && s>smax) ^ secvmax.cpp:29:30: error: 'smax' was not declared in this scope if(l>lmax|| l==lmax && s>smax) ^
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ă.