#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 | #64125306 | Utilizator | |
| Fișier | adfgx.cpp | Dimensiune | 3.43 KB |
| Data încărcării | 18 Aprilie 2026, 22:06 | Scor/rezultat | 30 puncte |
adfgx.cpp: In function ‘int main()’: adfgx.cpp:46:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 46 | for(int i=0; i<strlen(cheie)-1; i++) | ~^~~~~~~~~~~~~~~~ adfgx.cpp:47:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 47 | for(int j=i+1; j<strlen(cheie); j++) | ~^~~~~~~~~~~~~~ adfgx.cpp:54:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 54 | for(int i=0; i<strlen(mesaj); i++) | ~^~~~~~~~~~~~~~ adfgx.cpp:58:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 58 | { if(pj>=strlen(cheie)) | ~~^~~~~~~~~~~~~~~ adfgx.cpp:64:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 64 | if(pj>=strlen(cheie)) | ~~^~~~~~~~~~~~~~~ adfgx.cpp:71:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 71 | for(int i=0; i<strlen(cheie)-1; i++) | ~^~~~~~~~~~~~~~~~ adfgx.cpp:72:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 72 | for(int j=i+1; j<strlen(cheie); j++) | ~^~~~~~~~~~~~~~ adfgx.cpp:78:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 78 | for(int j=0; j<strlen(cheie); j++) | ~^~~~~~~~~~~~~~ adfgx.cpp:89:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 89 | for(int i=0; i<strlen(mesaj); i++) | ~^~~~~~~~~~~~~~ adfgx.cpp:98:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 98 | for(int j=0; j<strlen(cheie); j++) | ~^~~~~~~~~~~~~~ adfgx.cpp:109:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 109 | if(codare[k]==b) | ^~ adfgx.cpp:111:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 111 | if(a&&b) | ^~ adfgx.cpp:86:14: warning: unused variable ‘decod’ [-Wunused-variable] 86 | char decod[1000],a,b; | ^~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.002 secunde | OK. | 10 | 10 | ||
| 1 | 0.003 secunde | OK. | 10 | 10 | ||
| 2 | 0.004 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| 6 | 0.004 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 8 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 9 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 30 | |||||
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ă.