#13
Să se scrie un program care să afişeze prefixele şi sufixele unui cuvânt citit.
| Problema | Prefixe | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64943962 | Utilizator | |
| Fișier | prefixe.cpp | Dimensiune | 337 B |
| Data încărcării | 19 Iunie 2026, 18:31 | Scor/rezultat | 100 puncte |
prefixe.cpp: In function ‘int main()’: prefixe.cpp:8:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 8 | for(i=1; i<=strlen(s); i++) | ~^~~~~~~~~~~ prefixe.cpp:9:10: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | {for(int j=0; j<n; j++) | ^~~ prefixe.cpp:11:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | cout<<endl; n--; | ^~~~ prefixe.cpp:14:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 14 | while(n<strlen(s)) | ~^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 30 | 30 | ||
| 3 | 0.001 secunde | OK. | 30 | 30 | ||
| 4 | 0.001 secunde | OK. | 30 | 30 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Prefixe 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ă.