#3478
palixor
Se dă un şir format din n
numere naturale nenule. Aflaţi câte subşiruri ale şirului dat au proprietatea că, folosind toate cifrele numerelor din subşir, cu ajutorul acestora se poate forma un palindrom.
Problema | palixor | Operații I/O |
palixor.in /palixor.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 256 MB
/
Stivă 64 MB
|
Id soluție | #52869760 | Utilizator | |
Fișier | palixor.cpp | Dimensiune | 321 B |
Data încărcării | 11 Octombrie 2024, 11:29 | Scor / rezultat | Eroare de compilare |
palixor.cpp:3:7: error: expected nested-name-specifier before 'name' using name std; ^ palixor.cpp:3:7: error: 'name' has not been declared palixor.cpp:3:12: error: expected ';' before 'std' using name std; ^ palixor.cpp:3:12: error: 'std' does not name a type palixor.cpp: In function 'int main()': palixor.cpp:5:3: error: 'ifstream' was not declared in this scope {ifstream fin("2lan.in"); ^ palixor.cpp:5:3: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from palixor.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ palixor.cpp:5:12: error: expected ';' before 'fin' {ifstream fin("2lan.in"); ^ palixor.cpp:6:3: error: 'ofstream' was not declared in this scope ofstream fout("2lan.out"); ^ palixor.cpp:6:3: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from palixor.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ palixor.cpp:6:12: error: expected ';' before 'fout' ofstream fout("2lan.out"); ^ palixor.cpp:8:1: error: 'fin' was not declared in this scope fin>>n; ^ palixor.cpp:9:13: error: 'fout' was not declared in this scope if(n==0) fout<<1; else if(n%4==1) fout<<2; ^ palixor.cpp:9:43: error: 'fout' was not declared in this scope if(n==0) fout<<1; else if(n%4==1) fout<<2; ^ palixor.cpp:10:28: error: 'fout' was not declared in this scope else if(n%4==2) fout<<4; ^ palixor.cpp:11:29: error: 'fout' was not declared in this scope else if(n%4==3) fout<<8; ^ palixor.cpp:12:26: error: 'fout' was not declared in this scope else if(n%4==0) fout<<6; return 0;} ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema palixor 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ă.