#396
Se dă un șir cu n elemente, numere naturale. Determinați un cel mai lung subșir crescător al șirului.
| Problema | SCLM | Operații I/O |
sclm.in/sclm.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #61628854 | Utilizator | |
| Fișier | sclm.cpp | Dimensiune | 2.28 KB |
| Data încărcării | 04 Decembrie 2025, 13:30 | Scor/rezultat | Eroare de compilare |
sclm.cpp:61:13: error: redefinition of 'std::ifstream fin' ifstream fin("sclm.in"); ^ sclm.cpp:12:10: error: 'std::ifstream fin' previously declared here ifstream fin("sclm.in"); ^ sclm.cpp:62:14: error: redefinition of 'std::ofstream fout' ofstream fout("sclm.out"); ^ sclm.cpp:13:10: error: 'std::ofstream fout' previously declared here ofstream fout("sclm.out"); ^ sclm.cpp:64:5: error: redefinition of 'int n' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:5: error: 'int n' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:15: error: redefinition of 'int a [1002]' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:9: error: 'int a [1002]' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:25: error: redefinition of 'int L [1002]' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:19: error: 'int L [1002]' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:35: error: redefinition of 'int P [1002]' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:29: error: 'int P [1002]' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:39: error: redefinition of 'int p' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:39: error: 'int p' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:43: error: redefinition of 'int l' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:43: error: 'int l' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:47: error: redefinition of 'int pmax' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:47: error: 'int pmax' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:64:54: error: redefinition of 'int lmax' int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp:15:54: error: 'int lmax' previously declared here int n , a[1002] , L[1002] , P[1002] , p , l , pmax , lmax; ^ sclm.cpp: In function 'int main()': sclm.cpp:66:5: error: redefinition of 'int main()' int main() ^ sclm.cpp:17:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SCLM 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ă.