#961
Criptare
Adminul unei rețelei de n*n
calculatoare așezate sub forma unei matrici n
linii și n
coloane dorește să cripteze calculatoarele pentru a securiza rețeaua.
Problema | Criptare | Operații I/O |
![]() criptare.in /criptare.out
|
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #28516110 | Utilizator | |
Fișier | criptare.cpp | Dimensiune | 967 B |
Data încărcării | 09 Martie 2021, 08:16 | Scor / rezultat | Eroare de compilare |
criptare.cpp:3:14: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin ("criptare.in"); ^ criptare.cpp:4:15: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout ("criptare.out"); ^ criptare.cpp:8:1: error: 'vector' does not name a type vector<int> L, C; ^ criptare.cpp: In function 'int main()': criptare.cpp:11:5: error: reference to 'cin' is ambiguous cin >> n; ^ criptare.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin ("criptare.in"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ criptare.cpp:15:13: error: reference to 'cin' is ambiguous cin >> a[i][j]; ^ criptare.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin ("criptare.in"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ criptare.cpp:21:25: error: 'L' was not declared in this scope if (lin[i] == 0)L.push_back(i); ^ criptare.cpp:22:25: error: 'C' was not declared in this scope if (col[i] == 0)C.push_back(i); ^ criptare.cpp:24:5: error: reference to 'cout' is ambiguous cout << max(L.size(), C.size()) << '\n'; ^ criptare.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout ("criptare.out"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:24:17: error: 'L' was not declared in this scope cout << max(L.size(), C.size()) << '\n'; ^ criptare.cpp:24:27: error: 'C' was not declared in this scope cout << max(L.size(), C.size()) << '\n'; ^ criptare.cpp:27:9: error: reference to 'cout' is ambiguous cout << L[i] << ' ' << C[i] << '\n'; ^ criptare.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout ("criptare.out"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:30:13: error: reference to 'cout' is ambiguous cout << L[i] << ' ' << 1 << '\n'; ^ criptare.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout ("criptare.out"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:33:13: error: reference to 'cout' is ambiguous cout << 1 << ' ' << C[i] << '\n'; ^ criptare.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout ("criptare.out"); ^ In file included from criptare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Criptare 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ă.