#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 | #53960400 | Utilizator | |
Fișier | adfgvx.cpp | Dimensiune | 3.34 KB |
Data încărcării | 15 Noiembrie 2024, 23:03 | Scor / rezultat | Eroare de compilare |
adfgvx.cpp:13:19: error: conflicting declaration 'int fin [10000][200]' int fin[10000][200]; ^ adfgvx.cpp:6:10: error: 'fin' has a previous declaration as 'std::ifstream fin' ifstream fin("adfgvx.in"); ^ adfgvx.cpp: In function 'int main()': adfgvx.cpp:28:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<strlen(mesaj); i++) ^ adfgvx.cpp:73:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1; i<=(strlen(mesaj)/strlen(cheie))*2+1; i++) ^ adfgvx.cpp:75:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=1; j<=strlen(cheie); j++) ^ adfgvx.cpp:77:19: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(fin[i][j]!=0 && j==1)j++; ^ adfgvx.cpp:78:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(j+1<=strlen(cheie)) ^ adfgvx.cpp:80:20: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') fin[i][j]=cl[1][k]; ^ adfgvx.cpp:81:20: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') fin[i][j+1]=cl[2][k]; ^ adfgvx.cpp:87:20: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') fin[i][j]=cl[1][k]; ^ adfgvx.cpp:88:20: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') fin[i+1][1]=cl[2][k]; ^ adfgvx.cpp:96:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1; i<=strlen(vecsup); i++) ^ adfgvx.cpp:98:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=i+1; j<strlen(vecsup); j++) ^ adfgvx.cpp:105:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k=1; k<=(strlen(mesaj)/strlen(cheie))*2+1; k++) ^ adfgvx.cpp:108:29: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') swap(fin[k][i], fin[k][j]); ^ adfgvx.cpp:108:40: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') swap(fin[k][i], fin[k][j]); ^ adfgvx.cpp:125:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=1; j<=strlen(cheie); j++) ^ adfgvx.cpp:127:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1; i<=(strlen(mesaj)/strlen(cheie))*2+1; i++) ^ adfgvx.cpp:129:19: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(fin[i][j]==1)cout<<'A'; ^ adfgvx.cpp:130:24: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') else if(fin[i][j]==2)fout<<'D'; ^ adfgvx.cpp:131:24: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') else if(fin[i][j]==3)fout<<'F'; ^ adfgvx.cpp:132:24: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') else if(fin[i][j]==4)fout<<'G'; ^ adfgvx.cpp:133:24: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') else if(fin[i][j]==5)fout<<'V'; ^ adfgvx.cpp:134:24: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') else if(fin[i][j]==6)fout<<'X'; ^
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ă.