#1875
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 | #64832195 | Utilizator | |
| Fișier | platou1.cpp | Dimensiune | 601 B |
| Data încărcării | 04 Iunie 2026, 13:44 | Scor/rezultat | 100 puncte |
platou1.cpp: In function ‘int main()’: platou1.cpp:25:18: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 25 | else if (l == lmx) | ^~ platou1.cpp:27:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 27 | y = x; | ^ platou1.cpp:10:9: warning: unused variable ‘i’ [-Wunused-variable] 10 | int i, x, y, l, lmx, k, ans; | ^ platou1.cpp:18:13: warning: ‘y’ may be used uninitialized [-Wmaybe-uninitialized] 18 | if (x == y) l++; | ^~ platou1.cpp:10:15: note: ‘y’ was declared here 10 | int i, x, y, l, lmx, k, ans; | ^ platou1.cpp:14:10: warning: ‘k’ may be used uninitialized [-Wmaybe-uninitialized] 14 | k++; | ~^~ platou1.cpp:10:26: note: ‘k’ was declared here 10 | int i, x, y, l, lmx, k, ans; | ^ platou1.cpp:30:27: warning: ‘ans’ may be used uninitialized [-Wmaybe-uninitialized] 30 | fout << lmx << " " << ans; | ^~~ platou1.cpp:10:29: note: ‘ans’ was declared here 10 | int i, x, y, l, lmx, k, ans; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
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ă.