#2615
CaesarCrypt
Se citește un text. Se cere criptarea/decriptarea acestuia folosind Cifrul Caesar
.
Probleme de Criptografie
Problema | CaesarCrypt | Operații I/O |
caesar.in /dbftbs.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23177527 | Utilizator | |
Fișier | caesarcrypt.cpp | Dimensiune | 1.13 KB |
Data încărcării | 28 Mai 2020, 18:32 | Scor / rezultat | Eroare de compilare |
caesarcrypt.cpp:5:14: warning: character constant too long for its type [enabled by default] ifstream fin('caesar.in'); ^ caesarcrypt.cpp:6:15: warning: character constant too long for its type [enabled by default] ofstream fout('dbftbs.out'); ^ caesarcrypt.cpp:5:25: error: invalid conversion from 'int' to 'const char*' [-fpermissive] ifstream fin('caesar.in'); ^ In file included from caesarcrypt.cpp:3:0: /usr/include/c++/4.8/fstream:467:7: error: initializing argument 1 of 'std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]' [-fpermissive] basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^ caesarcrypt.cpp:6:27: error: invalid conversion from 'int' to 'const char*' [-fpermissive] ofstream fout('dbftbs.out'); ^ In file included from caesarcrypt.cpp:3:0: /usr/include/c++/4.8/fstream:640:7: error: initializing argument 1 of 'std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]' [-fpermissive] basic_ofstream(const char* __s, ^ caesarcrypt.cpp: In function 'int main()': caesarcrypt.cpp:17:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0; i<s.size(); i++) ^ caesarcrypt.cpp:36:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0; i<s.size(); i++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CaesarCrypt 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ă.