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 | #63711055 | Utilizator | |
| Fișier | palindrompropozitie.cpp | Dimensiune | 742 B |
| Data încărcării | 16 Martie 2026, 11:42 | Scor/rezultat | Eroare de compilare |
palindrompropozitie.cpp:5:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("palidrom.in"); ^ palindrompropozitie.cpp:6:14: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("palidrom.out"); ^ palindrompropozitie.cpp: In function 'int palidrom(char*)': palindrompropozitie.cpp:9:8: error: expected '(' before ')' token for)(int i = 0, j = strlen(s) - 1; ++i, --j) ^ palindrompropozitie.cpp:9:8: error: expected primary-expression before ')' token palindrompropozitie.cpp:9:8: error: expected ';' before ')' token palindrompropozitie.cpp:9:42: error: 'i' was not declared in this scope for)(int i = 0, j = strlen(s) - 1; ++i, --j) ^ palindrompropozitie.cpp:9:47: error: 'j' was not declared in this scope for)(int i = 0, j = strlen(s) - 1; ++i, --j) ^ palindrompropozitie.cpp:9:48: error: expected ';' before ')' token for)(int i = 0, j = strlen(s) - 1; ++i, --j) ^ palindrompropozitie.cpp: In function 'int palidromP(char*)': palindrompropozitie.cpp:19:19: error: expected primary-expression before ')' token if (t[i]==){ ^ palindrompropozitie.cpp: In function 'int main()': palindrompropozitie.cpp:34:20: error: expected ';' before ')' token fin.getline)(s,250); ^
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ă.