#3808
ADFGVX
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 | #46619317 | Utilizator | |
Fișier | adfgvx.cpp | Dimensiune | 2.78 KB |
Data încărcării | 18 Noiembrie 2023, 21:08 | Scor / rezultat | 100 puncte |
adfgvx.cpp: In function 'std::string encode(std::string, std::string)': adfgvx.cpp:32:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < msg.size(); i++) { ^ adfgvx.cpp:33:74: warning: array subscript has type 'char' [-Wchar-subscripts] chart[(i*2)%key.size()].second[(i*2)/key.size()] = decodes[msg[i]][0]; ^ adfgvx.cpp:34:78: warning: array subscript has type 'char' [-Wchar-subscripts] chart[(i*2+1)%key.size()].second[(i*2+1)/key.size()] = decodes[msg[i]][1]; ^ adfgvx.cpp:36:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < key.size(); i++) ^ adfgvx.cpp: In function 'std::string decode(std::string, std::string)': adfgvx.cpp:61:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (j >= key.size()) { ^ adfgvx.cpp:65:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i >= chart[key[j]].size()) ^ adfgvx.cpp:69:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (j >= key.size()) { ^ adfgvx.cpp:78:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i >= chart[key[j]].size()) ^ adfgvx.cpp: In function 'int main()': adfgvx.cpp:99:22: warning: array subscript has type 'char' [-Wchar-subscripts] decodes[x][0] = indexes[i]; ^ adfgvx.cpp:100:22: warning: array subscript has type 'char' [-Wchar-subscripts] decodes[x][1] = indexes[j]; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 5 | 5 | Exemplu | |
2 | 0 secunde | OK. | 5 | 5 | Exemplu | |
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 20 | 20 | ||
6 | 0 secunde | OK. | 20 | 20 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 5 | 5 | ||
10 | 0 secunde | OK. | 5 | 5 | ||
Punctaj total | 100 |
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ă.