#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 | #51158460 | Utilizator | |
Fișier | adfgx.cpp | Dimensiune | 3.46 KB |
Data încărcării | 27 Mai 2024, 18:15 | Scor / rezultat | 100 puncte |
adfgx.cpp: In function 'int main()': adfgx.cpp:31:28: warning: array subscript has type 'char' [-Wchar-subscripts] L[matrice[i][j]] = i; ^ adfgx.cpp:32:28: warning: array subscript has type 'char' [-Wchar-subscripts] C[matrice[i][j]] = j; ^ adfgx.cpp:46:37: warning: array subscript has type 'char' [-Wchar-subscripts] char c1 = cod[L[mesaj[i]]]; ^ adfgx.cpp:47:37: warning: array subscript has type 'char' [-Wchar-subscripts] char c2 = cod[C[mesaj[i]]]; ^ adfgx.cpp:52:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (col == strlen(cheie)) ^ adfgx.cpp:61:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (col == strlen(cheie)) ^ adfgx.cpp:72:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < strlen(cheie); i++) ^ adfgx.cpp:74:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 0; j < strlen(cheie); j++) ^ adfgx.cpp:84:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < strlen(cheie); i++) ^ adfgx.cpp:102:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < strlen(cheie); i++) ^ adfgx.cpp:104:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 0; j < strlen(cheie); j++) ^ adfgx.cpp:20:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("adfgx.in", "r", stdin); ^ adfgx.cpp:21:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("adfgx.out", "w", stdout); ^ adfgx.cpp:168:35: warning: 'col2' may be used uninitialized in this function [-Wmaybe-uninitialized] cout << matrice[lin2][col2]; ^ adfgx.cpp:168:35: warning: 'lin2' may be used uninitialized in this function [-Wmaybe-uninitialized]
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 10 | 10 | ||
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0.012 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0.012 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
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ă.