#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 | #51358770 | Utilizator | |
Fișier | criptare.cpp | Dimensiune | 992 B |
Data încărcării | 10 Iunie 2024, 13:52 | Scor / rezultat | Eroare de compilare |
criptare.cpp: In function 'int main()': criptare.cpp:17:5: error: reference to 'cin' is ambiguous cin >> n; ^ criptare.cpp:6:10: note: candidates are: std::ifstream cin ifstream cin ("criptare.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ criptare.cpp:21:13: error: reference to 'cin' is ambiguous cin >> a[i][j]; ^ criptare.cpp:6:10: note: candidates are: std::ifstream cin ifstream cin ("criptare.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ criptare.cpp:32:5: error: reference to 'cout' is ambiguous cout << max(L.size(), C.size()) << '\n'; ^ criptare.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout ("criptare.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:36:9: error: reference to 'cout' is ambiguous cout << L[i] << ' ' << C[i] << '\n'; ^ criptare.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout ("criptare.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:39:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = mn; i < L.size(); i ++) ^ criptare.cpp:40:13: error: reference to 'cout' is ambiguous cout << L[i] << ' ' << 1 << '\n'; ^ criptare.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout ("criptare.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ criptare.cpp:42:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = mn; i < C.size(); i ++) ^ criptare.cpp:43:13: error: reference to 'cout' is ambiguous cout << 1 << ' ' << C[i] << '\n'; ^ criptare.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout ("criptare.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from criptare.cpp:1: /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ă.