#88
Să se verifice dacă un cuvânt dat este palindrom.
| Problema | Palindrom | Operații I/O |
palindrom.in/palindrom.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64977661 | Utilizator | |
| Fișier | palindrom.cpp | Dimensiune | 771 B |
| Data încărcării | 01 Iulie 2026, 17:42 | Scor/rezultat | 100 puncte |
palindrom.cpp: In function ‘int main()’: palindrom.cpp:19:51: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 19 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2; j++, k--) { | ~^~~~~~~~~~~~~~~ palindrom.cpp:19:69: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 19 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2; j++, k--) { | ~^~~~~~~~~~~~~ palindrom.cpp:19:51: warning: left operand of comma operator has no effect [-Wunused-value] 19 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2; j++, k--) { | ~^~~~~~~~~~~~~~~ palindrom.cpp:28:51: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 28 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2+1; j++, k--) { | ~^~~~~~~~~~~~~~~ palindrom.cpp:28:69: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 28 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2+1; j++, k--) { | ~^~~~~~~~~~~~~~~ palindrom.cpp:28:51: warning: left operand of comma operator has no effect [-Wunused-value] 28 | for (j=0, k=strlen(s)-1; j<=strlen(s)/2-1, k>=strlen(s)/2+1; j++, k--) { | ~^~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 50 | 50 | ||
| 3 | 0.001 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Palindrom 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ă.