#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 | #53437623 | Utilizator | |
Fișier | schimb.cpp | Dimensiune | 1.01 KB |
Data încărcării | 30 Octombrie 2024, 15:51 | Scor / rezultat | Eroare de compilare |
schimb.cpp: In function 'int main()': schimb.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n >> k >> p; ^ schimb.cpp:4: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:5: error: reference to 'cin' is ambiguous cin.get(); ^ schimb.cpp:4: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:16:9: error: reference to 'cin' is ambiguous cin.getline(a , 501); ^ schimb.cpp:4: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:36:21: error: reference to 'cout' is ambiguous cout << ch; ^ schimb.cpp:5: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:38:21: error: reference to 'cout' is ambiguous cout << a[i]; ^ schimb.cpp:5: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:45:17: error: reference to 'cout' is ambiguous cout << a[capat]; ^ schimb.cpp:5: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:48:9: error: reference to 'cout' is ambiguous cout << endl; ^ schimb.cpp:5: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ă.