#3616
adfgx
Cifrul ADFGX
este un cifru care folosește o matrice pătratică 5x5
și o cheie
. În matricea pătratică, liniile și coloanele vor fi numerotate cu litere. Avem această matrice ca exemplu.
A D F G X A a b c d e D f g h i j F k l m n o G p q r s t X u v w x y
Problema | adfgx | Operații I/O |
![]() adfgx.in /adfgx.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51424132 | Utilizator | |
Fișier | adfgx.cpp | Dimensiune | 2.44 KB |
Data încărcării | 15 Iunie 2024, 10:09 | Scor / rezultat | Eroare de compilare |
adfgx.cpp: In function 'void read()': adfgx.cpp:27:5: error: reference to 'cin' is ambiguous cin >> task; ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp:28:5: error: reference to 'cin' is ambiguous cin.get(); ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp:31:9: error: reference to 'cin' is ambiguous cin.getline(cifru[i], 6); ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp:34:5: error: reference to 'cin' is ambiguous cin.getline(temp, NMAX); ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp: In function 'void build()': adfgx.cpp:52:37: warning: array subscript has type 'char' [-Wchar-subscripts] linie_litera[cifru[i][j]] = i; ^ adfgx.cpp:53:39: warning: array subscript has type 'char' [-Wchar-subscripts] coloana_litera[cifru[i][j]] = j; ^ adfgx.cpp: In function 'void codif()': adfgx.cpp:68:11: error: reference to 'cin' is ambiguous while(cin >> ch){ ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp:70:35: warning: array subscript has type 'char' [-Wchar-subscripts] a = litera[linie_litera[ch]]; ^ adfgx.cpp:71:37: warning: array subscript has type 'char' [-Wchar-subscripts] b = litera[coloana_litera[ch]]; ^ adfgx.cpp:86:9: error: reference to 'cout' is ambiguous cout << cheie[i].s << " "; ^ adfgx.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("adfgx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ adfgx.cpp: In function 'void decodif()': adfgx.cpp:118:11: error: reference to 'cin' is ambiguous while(cin >> cuv){ ^ adfgx.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("adfgx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adfgx.cpp:142:9: error: reference to 'cout' is ambiguous cout << convert(a, b); ^ adfgx.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("adfgx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from adfgx.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 adfgx 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ă.