#1413
ConstructPalindrom
C++
Find dat un string S
, se poate obține un palindrom din șirul inițial ștergând doar un singur caracter ?
Concursul Interjudețean de Informatică „Memorial Ștefan Dârțu”, ediția a XI-a, 12 decembrie 2015, Vatra Dornei
Problema | ConstructPalindrom | Operații I/O |
constructpalindrom.in /constructpalindrom.out
|
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53479545 | Utilizator | |
Fișier | constructpalindrom.cpp | Dimensiune | 1021 B |
Data încărcării | 01 Noiembrie 2024, 23:38 | Scor / rezultat | Eroare de compilare |
constructpalindrom.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("constructpalindrom.in"); ^ constructpalindrom.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("constructpalindrom.out"); ^ constructpalindrom.cpp: In function 'int main()': constructpalindrom.cpp:24:4: error: reference to 'cin' is ambiguous cin>>n; ^ constructpalindrom.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("constructpalindrom.in"); ^ In file included from constructpalindrom.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ constructpalindrom.cpp:28:8: error: reference to 'cin' is ambiguous cin>>s; ^ constructpalindrom.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("constructpalindrom.in"); ^ In file included from constructpalindrom.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ constructpalindrom.cpp:42:20: error: reference to 'cout' is ambiguous if(ok == 0) cout<<"NO"<<endl; ^ constructpalindrom.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("constructpalindrom.out"); ^ In file included from constructpalindrom.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ constructpalindrom.cpp:43:13: error: reference to 'cout' is ambiguous else cout<<"YES"<<endl; ^ constructpalindrom.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("constructpalindrom.out"); ^ In file included from constructpalindrom.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ConstructPalindrom 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ă.