#431
Graf complet
Se dau mai multe grafuri neorientate, prin matricea de adiacență. Să se verifice despre fiecare graf dacă este complet.
Problema | Graf complet | Operații I/O |
graf_complet.in /graf_complet.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50008531 | Utilizator | |
Fișier | graf_complet.cpp | Dimensiune | 689 B |
Data încărcării | 23 Martie 2024, 12:59 | Scor / rezultat | Eroare de compilare |
graf_complet.cpp: In function 'int main()': graf_complet.cpp:9:5: error: reference to 'cin' is ambiguous cin >> n; ^ graf_complet.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("graf_complet.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graf_complet.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ graf_complet.cpp:13:9: error: reference to 'cin' is ambiguous cin >> m; ^ graf_complet.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("graf_complet.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graf_complet.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ graf_complet.cpp:16:17: error: reference to 'cin' is ambiguous cin >> a[i][j]; ^ graf_complet.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("graf_complet.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graf_complet.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ graf_complet.cpp:20:22: error: reference to 'cout' is ambiguous if(cnt <= m) cout << "DA" << endl; ^ graf_complet.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("graf_complet.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graf_complet.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ graf_complet.cpp:21:14: error: reference to 'cout' is ambiguous else cout << "NU" << endl; ^ graf_complet.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("graf_complet.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graf_complet.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 Graf complet 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ă.