#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 | #48212397 | Utilizator | |
Fișier | graf_complet.cpp | Dimensiune | 684 B |
Data încărcării | 18 Ianuarie 2024, 16:38 | Scor / rezultat | Eroare de compilare |
graf_complet.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("graf_complet.in"); ^ graf_complet.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("graf_complet.out"); ^ 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: <typeprefixerror>cin ifstream cin("graf_complet.in"); ^ In file included from graf_complet.cpp:1:0: /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: <typeprefixerror>cin ifstream cin("graf_complet.in"); ^ In file included from graf_complet.cpp:1:0: /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: <typeprefixerror>cin ifstream cin("graf_complet.in"); ^ In file included from graf_complet.cpp:1:0: /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: <typeprefixerror>cout ofstream cout("graf_complet.out"); ^ In file included from graf_complet.cpp:1:0: /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: <typeprefixerror>cout ofstream cout("graf_complet.out"); ^ In file included from graf_complet.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 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ă.