#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 | #46962067 | Utilizator | |
| Fișier | palindrom.cpp | Dimensiune | 434 B |
| Data încărcării | 27 Noiembrie 2023, 22:28 | Scor/rezultat | Eroare de compilare |
palindrom.cpp:1:1: error: 'ifstream' does not name a type ifstream fin("palindrom.in"); ^ palindrom.cpp:2:1: error: 'ofstream' does not name a type ofstream fout("palindrom.out"); ^ palindrom.cpp: In function 'int palindrom(char*)': palindrom.cpp:6:17: error: 'strlen' was not declared in this scope l=strlen(cuv); ^ palindrom.cpp: In function 'int main()': palindrom.cpp:15:5: error: 'fin' was not declared in this scope fin>>n; ^ palindrom.cpp:19:27: error: 'fout' was not declared in this scope if(palindrom(cuv))fout<<1<<endl; ^ palindrom.cpp:19:36: error: 'endl' was not declared in this scope if(palindrom(cuv))fout<<1<<endl; ^ palindrom.cpp:20:18: error: 'fout' was not declared in this scope else fout<<0<<endl; ^ palindrom.cpp:20:27: error: 'endl' was not declared in this scope else fout<<0<<endl; ^ palindrom.cpp:13:11: warning: unused variable 'l' [-Wunused-variable] int n,l; ^
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ă.