#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 | #64484438 | Utilizator | |
| Fișier | adfgvx.cpp | Dimensiune | 2.81 KB |
| Data încărcării | 10 Mai 2026, 14:19 | Scor/rezultat | 100 puncte |
adfgvx.cpp: In function ‘int main()’: adfgvx.cpp:18:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 18 | character[ch]+="A"; | ^~ adfgvx.cpp:20:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 20 | character[ch]+="D"; | ^~ adfgvx.cpp:22:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 22 | character[ch]+="F"; | ^~ adfgvx.cpp:24:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 24 | character[ch]+="G"; | ^~ adfgvx.cpp:26:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 26 | character[ch]+="V"; | ^~ adfgvx.cpp:28:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 28 | character[ch]+="X"; | ^~ adfgvx.cpp:30:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 30 | character[ch]+="A"; | ^~ adfgvx.cpp:32:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 32 | character[ch]+="D"; | ^~ adfgvx.cpp:34:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 34 | character[ch]+="F"; | ^~ adfgvx.cpp:36:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 36 | character[ch]+="G"; | ^~ adfgvx.cpp:38:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 38 | character[ch]+="V"; | ^~ adfgvx.cpp:40:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] 40 | character[ch]+="X"; | ^~ adfgvx.cpp:41:34: warning: array subscript has type ‘char’ [-Wchar-subscripts] 41 | string cuv=character[ch]; | ^~ adfgvx.cpp:47:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 47 | for(int i=0;i<mesaj.size();i++) | ~^~~~~~~~~~~~~ adfgvx.cpp:48:43: warning: array subscript has type ‘char’ [-Wchar-subscripts] 48 | criptmesaj+=character[mesaj[i]]; | ^ adfgvx.cpp:49:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 49 | for(int i=0;i<criptmesaj.size();i++) | ~^~~~~~~~~~~~~~~~~~ adfgvx.cpp:55:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 55 | for(int j=0;j<cheie.size();j++) | ~^~~~~~~~~~~~~ adfgvx.cpp:59:34: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 59 | for(int i=0;i<criptmesaj.size()/cheie.size()+1;i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adfgvx.cpp:77:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 77 | for(int i=0;i<length.size();i++) | ~^~~~~~~~~~~~~~ adfgvx.cpp:81:34: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 81 | for(int k=0;k<a.size();k++) | ~^~~~~~~~~ adfgvx.cpp:89:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 89 | for(int j=0;j<length.size();j++) | ~^~~~~~~~~~~~~~ adfgvx.cpp:92:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 92 | for(int j=0;j<decriptmesaj.size();j+=2) | ~^~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 5 | 5 | Exemplu | |
| 2 | 0.001 secunde | OK. | 5 | 5 | Exemplu | |
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.002 secunde | OK. | 20 | 20 | ||
| 6 | 0.002 secunde | OK. | 20 | 20 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 5 | 5 | ||
| 10 | 0.001 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ă.