#846
Dubluri
Se dă un șir de caractere ce conține doar litere mici ale alfabetului englez. Să se afișeze cel mai lung subșir care apare de cel puțin două ori în șirul dat.
Problema | Dubluri | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #13869299 | Utilizator | |
Fișier | dubluri.cpp | Dimensiune | 550 B |
Data încărcării | 13 Februarie 2019, 08:59 | Scor / rezultat | Eroare de compilare |
dubluri.cpp:4:1: error: stray '\302' in program char s[256],ma[128],cuv[256]; ^ dubluri.cpp:4:1: error: stray '\240' in program dubluri.cpp:8:5: error: stray '\302' in program cin.get(s,256); ^ dubluri.cpp:8:5: error: stray '\240' in program dubluri.cpp:8:5: error: stray '\302' in program dubluri.cpp:8:5: error: stray '\240' in program dubluri.cpp:9:5: error: stray '\302' in program for(i=0;i<strlen(s);i++) ^ dubluri.cpp:9:5: error: stray '\240' in program dubluri.cpp:9:5: error: stray '\302' in program dubluri.cpp:9:5: error: stray '\240' in program dubluri.cpp:9:5: error: stray '\302' in program dubluri.cpp:9:5: error: stray '\240' in program dubluri.cpp:9:5: error: stray '\302' in program dubluri.cpp:9:5: error: stray '\240' in program dubluri.cpp:10:9: error: stray '\302' in program for(j=i+1;j<strlen(s);j++) ^ dubluri.cpp:10:9: error: stray '\240' in program dubluri.cpp:10:9: error: stray '\302' in program dubluri.cpp:10:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program { ^ dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:11:9: error: stray '\302' in program dubluri.cpp:11:9: error: stray '\240' in program dubluri.cpp:12:9: error: stray '\302' in program strncat(cuv,s+i,j-i); ^ dubluri.cpp:12:9: error: stray '\240' in program dubluri.cpp:12:9: error: stray '\302' in program dubluri.cpp:12:9: error: stray '\240' in program dubluri.cpp:12:9: error: stray '\302' in program dubluri.cpp:12:9: error: stray '\240' in program dubluri.cpp:12:9: error: stray '\302' in program dubluri.cpp:12:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program if(strstr(s+j,cuv)!=0) ^ dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:13:9: error: stray '\302' in program dubluri.cpp:13:9: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program if(strlen(cuv)>strlen(ma)||strlen(cuv)==strlen(ma)&&strcmp(cuv,ma)<0) ^ dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:14:13: error: stray '\302' in program dubluri.cpp:14:13: error: stray '\240' in program dubluri.cpp:15:17: error: stray '\302' in program strcpy(ma,cuv); ^ dubluri.cpp:15:17: error: stray '\240' in program dubluri.cpp:15:17: error: stray '\302' in program dubluri.cpp:15:17: error: stray '\240' in program dubluri.cpp:16:10: error: stray '\302' in program } ^ dubluri.cpp:16:10: error: stray '\240' in program dubluri.cpp:16:10: error: stray '\302' in program dubluri.cpp:16:10: error: stray '\240' in program dubluri.cpp:17:9: error: stray '\302' in program cout<<ma; ^ dubluri.cpp:17:9: error: stray '\240' in program dubluri.cpp:17:9: error: stray '\302' in program dubluri.cpp:17:9: error: stray '\240' in program dubluri.cpp: In function 'int main()': dubluri.cpp:9:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<strlen(s);i++) ^ dubluri.cpp:10:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=i+1;j<strlen(s);j++) ^ dubluri.cpp:14:63: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(strlen(cuv)>strlen(ma)||strlen(cuv)==strlen(ma)&&strcmp(cuv,ma)<0) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Dubluri 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ă.