#1879
platou2
Se consideră un şir format din n
numere naturale nenule. Să se determine lungimea maximă a unei secvenţe strict crescătoare din şirul dat.
Problema | platou2 | Operații I/O |
platou2.in /platou2.out
|
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 0.3 MB
/
Stivă 0.3 MB
|
Id soluție | #54189831 | Utilizator | |
Fișier | platou2.cpp | Dimensiune | 390 B |
Data încărcării | 21 Noiembrie 2024, 17:47 | Scor / rezultat | Eroare de compilare |
platou2.cpp: In function 'int main()': platou2.cpp:8:2: error: expected ',' or ';' before 'ofstream' ofstream fout ("platou2.out") ^ platou2.cpp:10:7: error: 'n' was not declared in this scope fin>>n>>x; ^ platou2.cpp:10:10: error: 'x' was not declared in this scope fin>>n>>x; ^ platou2.cpp:11:6: error: 'i' was not declared in this scope for(i=2;i<=n;i++) ^ platou2.cpp:13:11: error: 'y' was not declared in this scope fin>>y; ^ platou2.cpp:14:14: error: 'l' was not declared in this scope if(y>x) l++; ^ platou2.cpp:17:13: error: 'l' was not declared in this scope if(l>lmax) ^ platou2.cpp:17:15: error: 'lmax' was not declared in this scope if(l>lmax) ^ platou2.cpp:19:10: error: 'l' was not declared in this scope l=1; ^ platou2.cpp:23:5: error: 'l' was not declared in this scope if(l>lmax) ^ platou2.cpp:23:7: error: 'lmax' was not declared in this scope if(l>lmax) ^ platou2.cpp:25:2: error: 'fout' was not declared in this scope fout<<lmax; ^ platou2.cpp:25:8: error: 'lmax' was not declared in this scope fout<<lmax; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema platou2 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ă.