#3808
Să se cripteze sau să se decripteze un mesaj folosind cifrul ADFGVX.
cifrul ADFGVX
| Problema | ADFGVX | Operații I/O |
adfgvx.in/adfgvx.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64392575 | Utilizator | |
| Fișier | adfgvx.cpp | Dimensiune | 1.17 KB |
| Data încărcării | 04 Mai 2026, 23:51 | Scor/rezultat | 30 puncte |
adfgvx.cpp: In function ‘int main()’: adfgvx.cpp:27:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 27 | v[ch].lin=i; | ^~ adfgvx.cpp:28:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 28 | v[ch].col=j; | ^~ adfgvx.cpp:34:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] 34 | lin=v[mesaj[i]].lin; | ~~~~~~~^ adfgvx.cpp:35:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] 35 | col=v[mesaj[i]].col; | ~~~~~~~^ adfgvx.cpp:40:28: warning: array subscript has type ‘char’ [-Wchar-subscripts] 40 | pozitii[cheie[i]]=i; | ~~~~~~~^ adfgvx.cpp:45:35: warning: array subscript has type ‘char’ [-Wchar-subscripts] 45 | for (j=pozitii[cheie[i]]; j<len; j+=lcheie) | ~~~~~~~^ adfgvx.cpp:32:55: warning: unused variable ‘k’ [-Wunused-variable] 32 | int lcheie=strlen(cheie),lmesaj=strlen(mesaj),k=1; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 5 | 5 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.004 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 7 | 0.002 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | OK. | 5 | 5 | ||
| 10 | 0.003 secunde | Raspuns gresit. | 5 | 0 | ||
| Punctaj total | 30 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ADFGVX 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ă.