Să se verifice dacă o propoziție dată este palindromică.
| Problema | PalindromPropozitie | Operații I/O |
palindrom.in/palindrom.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #61609892 | Utilizator | |
| Fișier | palindrompropozitie.cpp | Dimensiune | 776 B |
| Data încărcării | 03 Decembrie 2025, 22:45 | Scor/rezultat | Eroare de compilare |
palindrompropozitie.cpp: In function 'int main()': palindrompropozitie.cpp:17:28: error: invalid conversion from 'int' to 'const char*' [-fpermissive] int s=0, d=strlen(s)-1; ^ In file included from /usr/include/c++/4.8/cstring:42:0, from palindrompropozitie.cpp:2: /usr/include/string.h:399:15: error: initializing argument 1 of 'size_t strlen(const char*)' [-fpermissive] extern size_t strlen (const char *__s) ^ palindrompropozitie.cpp:19:29: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(string[s] == " "){ ^ palindrompropozitie.cpp:19:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] palindrompropozitie.cpp:20:36: warning: comparison with string literal results in unspecified behaviour [-Waddress] while(string[s] != " "){ ^ palindrompropozitie.cpp:20:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] palindrompropozitie.cpp:24:29: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(string[d] == " "){ ^ palindrompropozitie.cpp:24:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] palindrompropozitie.cpp:25:36: warning: comparison with string literal results in unspecified behaviour [-Waddress] while(string[d] != " "){ ^ palindrompropozitie.cpp:25:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PalindromPropozitie 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ă.