#3561
Playfair
Să se cripteze sau să se decripteze un mesaj folosind cifrul Playfair
.
cifrul Playfair
Problema | Playfair | Operații I/O |
![]() playfair.in /playfair.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #24074112 | Utilizator | |
Fișier | playfair.cpp | Dimensiune | 2.61 KB |
Data încărcării | 25 Septembrie 2020, 16:41 | Scor / rezultat | 100 puncte |
playfair.cpp: In function 'int main()': playfair.cpp:20:16: warning: array subscript has type 'char' [-Wchar-subscripts] v[c]=i*10+j; ^ playfair.cpp:27:16: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[ch]==0) ^ playfair.cpp:39:23: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10==v[b]/10) ^ playfair.cpp:39:32: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10==v[b]/10) ^ playfair.cpp:41:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]%10!=5) ^ playfair.cpp:42:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[a]%10+1]; ^ playfair.cpp:42:45: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[a]%10+1]; ^ playfair.cpp:44:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][1]; ^ playfair.cpp:45:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[b]%10!=5) ^ playfair.cpp:46:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][v[b]%10+1]; ^ playfair.cpp:46:45: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][v[b]%10+1]; ^ playfair.cpp:48:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][1]; ^ playfair.cpp:50:28: warning: array subscript has type 'char' [-Wchar-subscripts] else if(v[a]%10==v[b]%10) ^ playfair.cpp:50:37: warning: array subscript has type 'char' [-Wchar-subscripts] else if(v[a]%10==v[b]%10) ^ playfair.cpp:52:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10!=5) ^ playfair.cpp:53:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10+1][v[a]%10]; ^ playfair.cpp:53:47: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10+1][v[a]%10]; ^ playfair.cpp:55:39: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[1][v[a]%10]; ^ playfair.cpp:56:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[b]/10!=5) ^ playfair.cpp:57:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10+1][v[b]%10]; ^ playfair.cpp:57:47: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10+1][v[b]%10]; ^ playfair.cpp:59:39: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[1][v[b]%10]; ^ playfair.cpp:63:32: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:63:41: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:63:53: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:63:62: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:77:23: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10==v[b]/10) ^ playfair.cpp:77:32: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10==v[b]/10) ^ playfair.cpp:79:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]%10!=1) ^ playfair.cpp:80:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[a]%10-1]; ^ playfair.cpp:80:45: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[a]%10-1]; ^ playfair.cpp:82:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][5]; ^ playfair.cpp:83:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[b]%10!=1) ^ playfair.cpp:84:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][v[b]%10-1]; ^ playfair.cpp:84:45: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][v[b]%10-1]; ^ playfair.cpp:86:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10][5]; ^ playfair.cpp:88:28: warning: array subscript has type 'char' [-Wchar-subscripts] else if(v[a]%10==v[b]%10) ^ playfair.cpp:88:37: warning: array subscript has type 'char' [-Wchar-subscripts] else if(v[a]%10==v[b]%10) ^ playfair.cpp:90:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[a]/10!=1) ^ playfair.cpp:91:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10-1][v[a]%10]; ^ playfair.cpp:91:47: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10-1][v[a]%10]; ^ playfair.cpp:93:39: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[5][v[a]%10]; ^ playfair.cpp:94:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(v[b]/10!=1) ^ playfair.cpp:95:36: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10-1][v[b]%10]; ^ playfair.cpp:95:47: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[b]/10-1][v[b]%10]; ^ playfair.cpp:97:39: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[5][v[b]%10]; ^ playfair.cpp:101:32: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:101:41: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:101:53: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:101:62: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<m[v[a]/10][v[b]%10]<<m[v[b]/10][v[a]%10]; ^ playfair.cpp:24:10: warning: 'lipsa' may be used uninitialized in this function [-Wmaybe-uninitialized] char lipsa; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | Exemplu | |
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Playfair 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ă.