#3101
XORCrypt
Se citește un text. Se cere criptarea acestuia folosind Encripția XOR
.
Probleme de Criptografie
Problema | XORCrypt | Operații I/O |
xorcrypt.in /xorcrypt.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51956104 | Utilizator | |
Fișier | xorcrypt.cpp | Dimensiune | 503 B |
Data încărcării | 12 Septembrie 2024, 11:29 | Scor / rezultat | Eroare de compilare |
xorcrypt.cpp: In function 'int main()': xorcrypt.cpp:18:17: error: no matching function for call to 'std::basic_ifstream<char>::getline(std::string&)' in.getline(a); ^ xorcrypt.cpp:18:17: note: candidates are: In file included from /usr/include/c++/4.8/fstream:38:0, from xorcrypt.cpp:1: /usr/include/c++/4.8/istream:618:5: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] basic_istream<char>:: ^ /usr/include/c++/4.8/istream:618:5: note: candidate expects 3 arguments, 1 provided /usr/include/c++/4.8/istream:427:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] getline(char_type* __s, streamsize __n) ^ /usr/include/c++/4.8/istream:427:7: note: candidate expects 2 arguments, 1 provided xorcrypt.cpp:19:17: error: no matching function for call to 'std::basic_ifstream<char>::getline(std::string&)' in.getline(b); ^ xorcrypt.cpp:19:17: note: candidates are: In file included from /usr/include/c++/4.8/fstream:38:0, from xorcrypt.cpp:1: /usr/include/c++/4.8/istream:618:5: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] basic_istream<char>:: ^ /usr/include/c++/4.8/istream:618:5: note: candidate expects 3 arguments, 1 provided /usr/include/c++/4.8/istream:427:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int] getline(char_type* __s, streamsize __n) ^ /usr/include/c++/4.8/istream:427:7: note: candidate expects 2 arguments, 1 provided xorcrypt.cpp:21:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < a.size(); ++i) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema XORCrypt 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ă.