#413
Adiacenta1
Se dă lista muchiilor unui graf neorientat. Să se afișeze matricea de adiacență a grafului.
Problema | Adiacenta1 | Operații I/O |
adiacenta1.in /adiacenta1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52540467 | Utilizator | |
Fișier | adiacenta1.cpp | Dimensiune | 679 B |
Data încărcării | 02 Octombrie 2024, 19:09 | Scor / rezultat | Eroare de compilare |
adiacenta1.cpp: In function 'int main()': adiacenta1.cpp:9:5: error: reference to 'cin' is ambiguous cin >> n; ^ adiacenta1.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 adiacenta1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adiacenta1.cpp:13:9: error: reference to 'cin' is ambiguous cin >> m; ^ adiacenta1.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 adiacenta1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adiacenta1.cpp:16:17: error: reference to 'cin' is ambiguous cin >> a[i][j]; ^ adiacenta1.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 adiacenta1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ adiacenta1.cpp:20:22: error: reference to 'cout' is ambiguous if(cnt <= m) cout << "DA" << endl; ^ adiacenta1.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 adiacenta1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ adiacenta1.cpp:21:14: error: reference to 'cout' is ambiguous else cout << "NU" << endl; ^ adiacenta1.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 adiacenta1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ adiacenta1.cpp:24:26: error: expected '}' at end of input a[i][j]=0; ^ adiacenta1.cpp:24:26: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Adiacenta1 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ă.