#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 | #64238480 | Utilizator | |
| Fișier | platou1.cpp | Dimensiune | 453 B |
| Data încărcării | 24 Aprilie 2026, 16:14 | Scor/rezultat | Eroare de compilare |
platou1.cpp:28:6: error: extended character × is not valid in an identifier 28 | e=×; | ^ platou1.cpp:35:17: warning: missing terminating ' character 35 | cout << lm<<'x<<e | ^ platou1.cpp:35:17: error: missing terminating ' character 35 | cout << lm<<'x<<e | ^~~~~ platou1.cpp:1:1: error: ‘include’ does not name a type 1 | include<iostream> | ^~~~~~~ platou1.cpp: In function ‘int main()’: platou1.cpp:6:1: error: ‘cin’ was not declared in this scope 6 | cin>>x; | ^~~ platou1.cpp:7:1: error: ‘lc’ was not declared in this scope; did you mean ‘Lc’? 7 | lc=1,pc=1; | ^~ | Lc platou1.cpp:11:14: error: ‘Lm’ was not declared in this scope; did you mean ‘lm’? 11 | else if(Lc>Lm) | ^~ | lm platou1.cpp:12:3: error: expected primary-expression before ‘}’ token 12 | } | ^ platou1.cpp:17:4: error: ‘else’ without a previous ‘if’ 17 | else if(Lc=Lm)&&x<e) | ^~~~ platou1.cpp:17:15: error: ‘Lm’ was not declared in this scope; did you mean ‘lm’? 17 | else if(Lc=Lm)&&x<e) | ^~ | lm platou1.cpp:17:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 17 | else if(Lc=Lm)&&x<e) | ~~~^~ platou1.cpp:17:23: error: expected ‘;’ before ‘)’ token 17 | else if(Lc=Lm)&&x<e) | ^ | ; platou1.cpp:17:21: warning: statement has no effect [-Wunused-value] 17 | else if(Lc=Lm)&&x<e) | ~~~^~ platou1.cpp:37:5: error: expected ‘}’ at end of input 37 | } | ^ platou1.cpp:5:1: note: to match this ‘{’ 5 | { int Lc,pm,lm,e,x,pc,y,z; | ^ platou1.cpp:5:25: warning: unused variable ‘z’ [-Wunused-variable] 5 | { int Lc,pm,lm,e,x,pc,y,z; | ^ platou1.cpp:17:20: error: label ‘x’ used but not defined 17 | else if(Lc=Lm)&&x<e) | ^
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ă.