#3856
Să se cripteze sau să se decripteze un mesaj folosind cifrul Scytale.
cifrul Scytale
| Problema | Scytale | Operații I/O |
scytale.in/scytale.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63033411 | Utilizator | |
| Fișier | scytale.cpp | Dimensiune | 1.23 KB |
| Data încărcării | 11 Februarie 2026, 10:26 | Scor/rezultat | Eroare de compilare |
scytale.cpp:5:1: error: 'usig' does not name a type usig namespace std; ^ scytale.cpp: In function 'int main()': scytale.cpp:9:5: error: 'ifstream' was not declared in this scope ifstream fin("scytale.in"); ^ scytale.cpp:9:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from scytale.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ scytale.cpp:9:14: error: expected ';' before 'fin' ifstream fin("scytale.in"); ^ scytale.cpp:10:5: error: 'ofstream' was not declared in this scope ofstream fout("scytale.out"); ^ scytale.cpp:10:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from scytale.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ scytale.cpp:10:14: error: expected ';' before 'fout' ofstream fout("scytale.out"); ^ scytale.cpp:13:5: error: 'string' was not declared in this scope string mes; ^ scytale.cpp:13:5: note: suggested alternative: In file included from /usr/include/c++/4.8/iosfwd:39:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from scytale.cpp:1: /usr/include/c++/4.8/bits/stringfwd.h:62:33: note: 'std::string' typedef basic_string<char> string; ^ scytale.cpp:13:12: error: expected ';' before 'mes' string mes; ^ scytale.cpp:14:5: error: 'fin' was not declared in this scope fin >> c >> mes >> m; ^ scytale.cpp:14:17: error: 'mes' was not declared in this scope fin >> c >> mes >> m; ^ scytale.cpp:33:16: error: expected ';' before 'rez' string rez = ""; ^ scytale.cpp:36:38: error: 'rez' was not declared in this scope if(mat[i][j] != ' ') rez += mat[i][j]; ^ scytale.cpp:38:9: error: 'fout' was not declared in this scope fout << rez << "\n"; ^ scytale.cpp:38:17: error: 'rez' was not declared in this scope fout << rez << "\n"; ^ scytale.cpp:48:16: error: expected ';' before 'rez' string rez = ""; ^ scytale.cpp:51:38: error: 'rez' was not declared in this scope if(mat[i][j] != ' ') rez += mat[i][j]; ^ scytale.cpp:53:9: error: 'fout' was not declared in this scope fout << rez << "\n"; ^ scytale.cpp:53:17: error: 'rez' was not declared in this scope fout << rez << "\n"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Scytale 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ă.