#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 | #57733464 | Utilizator | |
Fișier | palindrom.cpp | Dimensiune | 724 B |
Data încărcării | 13 Aprilie 2025, 01:16 | Scor / rezultat | Eroare de compilare |
palindrom.cpp:5:14: warning: missing terminating " character [enabled by default] ifstream fin("palindrom.in); ^ palindrom.cpp:5:1: error: missing terminating " character ifstream fin("palindrom.in); ^ palindrom.cpp:6:15: warning: missing terminating " character [enabled by default] ofstream fout("palindrom.out); ^ palindrom.cpp:6:1: error: missing terminating " character ofstream fout("palindrom.out); ^ palindrom.cpp:7:12: error: expected ')' before '{' token int main() { ^ palindrom.cpp:7:12: error: expected ')' before '{' token palindrom.cpp: In function 'std::ifstream fin(std::ofstream (*)(int (*)()))': palindrom.cpp:10:13: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' and 'int' to binary 'operator>>' fin>>x; ^ palindrom.cpp:11:12: error: request for member 'get' in 'fin', which is of non-class type 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' fin.get(); ^ palindrom.cpp:16:15: error: request for member 'getline' in 'fin', which is of non-class type 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' fin.getline(s,101); ^ palindrom.cpp:28:20: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' fout<<"1"; ^ palindrom.cpp:30:18: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [2]' to binary 'operator<<' fout<<"0"; ^ palindrom.cpp:38:14: error: could not convert '0' from 'int' to 'std::ifstream {aka std::basic_ifstream<char>}' return 0; ^ palindrom.cpp:8:17: warning: unused variable 'c' [-Wunused-variable] char s[101],c,t[101]; ^ palindrom.cpp:8:19: warning: unused variable 't' [-Wunused-variable] char s[101],c,t[101]; ^ palindrom.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.