#975
Se dă o propoziție formată din litere mici ale alfabetului englez, spații și semnele de punctuație ,.. Determinați un cuvânt palindrom din propoziție, primul în ordine alfabetică.
| Problema | Cuvinte2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64146599 | Utilizator | |
| Fișier | cuvinte2.cpp | Dimensiune | 632 B |
| Data încărcării | 20 Aprilie 2026, 12:56 | Scor/rezultat | 20 puncte |
cuvinte2.cpp: In function ‘int voc(char*)’: cuvinte2.cpp:11:11: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 11 | for(i=0;i<strlen(c);i++) | ~^~~~~~~~~~ cuvinte2.cpp:16:18: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 16 | if(strlen(c)==k*2-1) | ~~~~~~~~~^~~~~~~ cuvinte2.cpp:15:7: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 15 | if(strlen(c)%2==1) | ^ cuvinte2.cpp:21:18: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 21 | if(strlen(c)==k*2) | ~~~~~~~~~^~~~~ cuvinte2.cpp:20:7: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 20 | if(strlen(c)%2==0) | ^ cuvinte2.cpp: In function ‘int main()’: cuvinte2.cpp:41:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 41 | if(t==0) | ^~ cuvinte2.cpp:43:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 43 | return 0; | ^~~~~~ cuvinte2.cpp: In function ‘int voc(char*)’: cuvinte2.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type] 26 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvinte2 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ă.