#181
SecvCresc
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 | #50309049 | Utilizator | |
Fișier | secvcresc.cpp | Dimensiune | 643 B |
Data încărcării | 04 Aprilie 2024, 08:54 | Scor / rezultat | Eroare de compilare |
secvcresc.cpp:3:1: error: stray '\315' in program ifstream f("secvcresc.in"); ^ secvcresc.cpp:3:1: error: stray '\276' in program secvcresc.cpp:4:1: error: stray '\315' in program ofstream g("secvcresc.out"); ^ secvcresc.cpp:4:1: error: stray '\276' in program secvcresc.cpp:5:1: error: stray '\315' in program int n, v[10002], st, dr, lmax=-1, l, s; ^ secvcresc.cpp:5:1: error: stray '\276' in program secvcresc.cpp:8:5: error: stray '\315' in program f>>n; ^ secvcresc.cpp:8:5: error: stray '\276' in program secvcresc.cpp:9:5: error: stray '\315' in program for(int i=1; i<=n; i++){ ^ secvcresc.cpp:9:5: error: stray '\276' in program secvcresc.cpp:9:5: error: stray '\315' in program secvcresc.cpp:9:5: error: stray '\276' in program secvcresc.cpp:10:9: error: stray '\315' in program f>>v[i]; ^ secvcresc.cpp:10:9: error: stray '\276' in program secvcresc.cpp:12:5: error: stray '\315' in program for(int i=1; i<=n; i++){ ^ secvcresc.cpp:12:5: error: stray '\276' in program secvcresc.cpp:12:5: error: stray '\315' in program secvcresc.cpp:12:5: error: stray '\276' in program secvcresc.cpp:13:9: error: stray '\315' in program if(s==0) s=i; ^ secvcresc.cpp:13:9: error: stray '\276' in program secvcresc.cpp:15:13: error: stray '\315' in program if(v[i]<v[i+1]) l++; ^ secvcresc.cpp:15:13: error: stray '\276' in program secvcresc.cpp:18:21: error: stray '\315' in program lmax=l; ^ secvcresc.cpp:18:21: error: stray '\276' in program secvcresc.cpp:19:21: error: stray '\315' in program st=s; ^ secvcresc.cpp:19:21: error: stray '\276' in program secvcresc.cpp:20:21: error: stray '\315' in program dr=i; ^ secvcresc.cpp:20:21: error: stray '\276' in program secvcresc.cpp:22:17: error: stray '\315' in program s=0; ^ secvcresc.cpp:22:17: error: stray '\276' in program secvcresc.cpp:23:17: error: stray '\315' in program l=0; ^ secvcresc.cpp:23:17: error: stray '\276' in program secvcresc.cpp:27:5: error: stray '\315' in program g<<st<<" "<<dr; ^ secvcresc.cpp:27:5: error: stray '\276' in program secvcresc.cpp:28:5: error: stray '\315' in program f.close(); ^ secvcresc.cpp:28:5: error: stray '\276' in program secvcresc.cpp:29:5: error: stray '\315' in program g.close(); ^ secvcresc.cpp:29:5: error: stray '\276' in program secvcresc.cpp:30:5: error: stray '\315' in program return 0; ^ secvcresc.cpp:30:5: error: stray '\276' in program secvcresc.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream g("secvcresc.out"); ^
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ă.