#1580
schimb
Se dau trei numere naturale n
, k
și p
și n
șiruri formate din litere mici ale alfabetului englez. Înlocuiți a k
-a literă din fiecare șir cu a p
-a literă din alfabet. Dacă șirul are mai puțin de k
litere se va scrie oglinditul lui.
Problema | schimb | Operații I/O |
schimb.in /schimb.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54543625 | Utilizator | |
Fișier | schimb.cpp | Dimensiune | 518 B |
Data încărcării | 02 Decembrie 2024, 09:38 | Scor / rezultat | Eroare de compilare |
schimb.cpp: In function 'int main()': schimb.cpp:9:5: error: reference to 'cin' is ambiguous cin>>n>>k>>p;cin.get(); ^ schimb.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("schimb.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ schimb.cpp:9:18: error: reference to 'cin' is ambiguous cin>>n>>k>>p;cin.get(); ^ schimb.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("schimb.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ schimb.cpp:12:9: error: reference to 'cin' is ambiguous cin.getline(c,580); ^ schimb.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("schimb.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ schimb.cpp:13:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(strlen(c)>=k) ^ schimb.cpp:16:13: error: reference to 'cout' is ambiguous cout<<c; ^ schimb.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("schimb.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ schimb.cpp:22:16: error: reference to 'cout' is ambiguous cout<<c[j]; ^ schimb.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("schimb.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ schimb.cpp:25:9: error: reference to 'cout' is ambiguous cout<<'\n'; ^ schimb.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("schimb.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from schimb.cpp:1: /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 schimb 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ă.