#1875
platou1
Se consideră un șir de cifre. Să se determine lungimea maximală a unei secvențe din șir formată din cifre egale.
Problema | platou1 | Operații I/O |
platou1.in /platou1.out
|
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 0.5 MB
/
Stivă 0.5 MB
|
Id soluție | #54189925 | Utilizator | |
Fișier | platou1.cpp | Dimensiune | 480 B |
Data încărcării | 21 Noiembrie 2024, 17:48 | Scor / rezultat | Eroare de compilare |
platou1.cpp: In function 'int main()': platou1.cpp:7:17: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("platou2.in"); ^ platou1.cpp:8:18: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("platou2.out") ^ platou1.cpp:9:5: error: expected ',' or ';' before 'int' int x,n,i,y,l=1,lMax=0,nr; ^ platou1.cpp:10:10: error: 'n' was not declared in this scope fin>>n>>x; ^ platou1.cpp:10:13: error: 'x' was not declared in this scope fin>>n>>x; ^ platou1.cpp:11:9: error: 'i' was not declared in this scope for(i=2;i<=n;i++){ ^ platou1.cpp:12:14: error: 'y' was not declared in this scope fin>>y; ^ platou1.cpp:14:13: error: 'l' was not declared in this scope l++; ^ platou1.cpp:15:13: error: 'nr' was not declared in this scope nr=x; ^ platou1.cpp:18:16: error: 'l' was not declared in this scope if(l>lMax) ^ platou1.cpp:18:18: error: 'lMax' was not declared in this scope if(l>lMax) ^ platou1.cpp:20:13: error: 'l' was not declared in this scope l=1; ^ platou1.cpp:24:8: error: 'l' was not declared in this scope if(l>lMax) ^ platou1.cpp:24:10: error: 'lMax' was not declared in this scope if(l>lMax) ^ platou1.cpp:26:15: error: 'lMax' was not declared in this scope fout<<lMax<<" "<<nr; ^ platou1.cpp:26:26: error: 'nr' was not declared in this scope fout<<lMax<<" "<<nr; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema platou1 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ă.