#3616
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 | #57119391 | Utilizator | |
Fișier | adfgx.cpp | Dimensiune | 1.56 KB |
Data încărcării | 17 Martie 2025, 12:45 | Scor / rezultat | Eroare de compilare |
adfgx.cpp:6:34: error: declaration of 'ch' as array of references void cod(int i, int j, char &ch[3]) ^ adfgx.cpp: In function 'void cod(...)': adfgx.cpp:8:8: error: 'i' was not declared in this scope if(i==0) ^ adfgx.cpp:9:10: error: 'ch' was not declared in this scope ch[0]='A'; ^ adfgx.cpp:11:9: error: 'ch' was not declared in this scope ch[0]='D'; ^ adfgx.cpp:13:9: error: 'ch' was not declared in this scope ch[0]='F'; ^ adfgx.cpp:15:9: error: 'ch' was not declared in this scope ch[0]='G'; ^ adfgx.cpp:17:9: error: 'ch' was not declared in this scope ch[0]='X'; ^ adfgx.cpp:19:8: error: 'j' was not declared in this scope if(j==0) ^ adfgx.cpp:20:10: error: 'ch' was not declared in this scope ch[1]='A'; ^ adfgx.cpp:22:9: error: 'ch' was not declared in this scope ch[1]='D'; ^ adfgx.cpp:24:9: error: 'ch' was not declared in this scope ch[1]='F'; ^ adfgx.cpp:26:9: error: 'ch' was not declared in this scope ch[1]='G'; ^ adfgx.cpp:28:9: error: 'ch' was not declared in this scope ch[1]='X'; ^ adfgx.cpp: In function 'int main()': adfgx.cpp:42:32: warning: NULL used in arithmetic [-Wpointer-arith] for(int i=0; cheie[i]!=NULL; i++) ^ adfgx.cpp:44:32: warning: NULL used in arithmetic [-Wpointer-arith] for(int i=0; cheie[i]!=NULL; i++) ^ adfgx.cpp:52:32: warning: NULL used in arithmetic [-Wpointer-arith] for(int t=0; mesaj[t]!=NULL; t++) ^ adfgx.cpp:65:13: error: expected primary-expression before '}' token } ^ adfgx.cpp:65:13: error: expected ';' before '}' token adfgx.cpp:51:13: warning: unused variable 'l' [-Wunused-variable] int l=1, c=0; ^
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ă.