#3900
Myszkowski
Sa se cripteze sau sa se decripteze un mesaj folosind cifrul Myszkowski
.
cifrul Myszkowski
Problema | Myszkowski | Operații I/O |
myszkowski.in /myszkowski.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #46627634 | Utilizator | |
Fișier | myszkowski.cpp | Dimensiune | 4.20 KB |
Data încărcării | 19 Noiembrie 2023, 11:46 | Scor / rezultat | 30 puncte |
myszkowski.cpp: In function 'std::string encode(std::string, std::string)': myszkowski.cpp:31:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < msg.size(); i++) ^ myszkowski.cpp:33:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < key.size(); i++) { ^ myszkowski.cpp:40:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < key.size(); i++) ^ myszkowski.cpp:45:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (stop < key.size() && !unique(get<2>(chart[stop]))) ^ myszkowski.cpp: In function 'bool attempt(std::string*, int, bool)': myszkowski.cpp:70:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int q = 0; q < arr[k].size(); q++) { ^ myszkowski.cpp:73:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (j >= arr[i].size()) ^ myszkowski.cpp: In function 'std::string decode(std::string, std::string)': myszkowski.cpp:93:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int k = 0; k < skey.size(); k++) { ^ myszkowski.cpp:94:43: warning: array subscript has type 'char' [-Wchar-subscripts] chart[make_pair(skey[k], f[skey[k]]++)] = msg.substr(st, l); ^ myszkowski.cpp:104:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int k = 0; k < skey.size(); k++) { ^ myszkowski.cpp:106:52: warning: array subscript has type 'char' [-Wchar-subscripts] arr[0] = chart[make_pair(skey[k], f[skey[k]]++)]; ^ myszkowski.cpp:108:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (k == skey.size() - 1) ^ myszkowski.cpp:111:63: warning: array subscript has type 'char' [-Wchar-subscripts] arr[dr - k] = chart[make_pair(skey[dr], f[skey[dr]]++)]; ^ myszkowski.cpp:119:47: warning: array subscript has type 'char' [-Wchar-subscripts] chart[make_pair(skey[i], g[skey[i]]++)] = arr[i - k]; ^ myszkowski.cpp:127:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 0; j < key.size(); j++) { ^ myszkowski.cpp:128:59: warning: array subscript has type 'char' [-Wchar-subscripts] string curr = chart[make_pair(key[j], g[key[j]]++)]; ^ myszkowski.cpp:129:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i >= curr.size()) ^
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 | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Caught fatal signal 8 | 10 | 0 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 30 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Myszkowski 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ă.