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 | #61641905 | Utilizator | |
| Fișier | palindrompropozitie.cpp | Dimensiune | 463 B |
| Data încărcării | 04 Decembrie 2025, 19:53 | Scor/rezultat | Eroare de compilare |
palindrompropozitie.cpp:5:1: error: 'ifstream' does not name a type ifstream fin("palindrom.in"); ^ palindrompropozitie.cpp:6:1: error: 'ofstream' does not name a type ofstream fout("palindrom.out"); ^ palindrompropozitie.cpp: In function 'int main()': palindrompropozitie.cpp:10:5: error: 'fin' was not declared in this scope fin>>n; ^ palindrompropozitie.cpp:15:19: error: expected unqualified-id before 'int' for (int i=0, int j=strlen(s-1); i<j; i++, j--) ^ palindrompropozitie.cpp:15:19: error: expected ';' before 'int' palindrompropozitie.cpp:15:39: warning: for increment expression has no effect [-Wunused-value] for (int i=0, int j=strlen(s-1); i<j; i++, j--) ^ palindrompropozitie.cpp:15:41: error: expected ')' before ';' token for (int i=0, int j=strlen(s-1); i<j; i++, j--) ^ palindrompropozitie.cpp:15:48: error: 'j' was not declared in this scope for (int i=0, int j=strlen(s-1); i<j; i++, j--) ^ palindrompropozitie.cpp:15:51: error: expected ';' before ')' token for (int i=0, int j=strlen(s-1); i<j; i++, j--) ^ palindrompropozitie.cpp:19:5: error: 'fout' was not declared in this scope fout<<0<<endl; ^ palindrompropozitie.cpp:21:5: error: 'fout' was not declared in this scope fout<<1<<endl;} ^
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ă.