#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 | #42590817 | Utilizator | |
Fișier | secvcresc.cpp | Dimensiune | 409 B |
Data încărcării | 11 Martie 2023, 15:02 | Scor / rezultat | Eroare de compilare |
secvcresc.cpp: In function 'int main()': secvcresc.cpp:8:5: error: expected ',' or ';' before 'ofstream' ofstream g("secvcresc.out") ^ secvcresc.cpp:10:8: error: 'n' was not declared in this scope f>>n; ^ secvcresc.cpp:11:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ secvcresc.cpp:13:12: error: 'v' was not declared in this scope f>>v[i]; ^ secvcresc.cpp:16:13: error: 's' was not declared in this scope s++; ^ secvcresc.cpp:17:18: error: 'mx' was not declared in this scope if(s>mx) ^ secvcresc.cpp:18:19: error: 'B' was not declared in this scope {mx=s;B=i;A=i-mx+1;} ^ secvcresc.cpp:18:23: error: 'A' was not declared in this scope {mx=s;B=i;A=i-mx+1;} ^ secvcresc.cpp:21:13: error: 's' was not declared in this scope s=1; ^ secvcresc.cpp:23:5: error: 'g' was not declared in this scope g<<A<<" "<<B; ^ secvcresc.cpp:23:8: error: 'A' was not declared in this scope g<<A<<" "<<B; ^ secvcresc.cpp:23:16: error: 'B' was not declared in this scope g<<A<<" "<<B; ^
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ă.