#543
Bipartit2
Se dă lista muchiilor unui graf neorientat conex cu n
vârfuri, etichetate de la 1
la n
. Să se verifice dacă graful este bipartit.
Problema | Bipartit2 | Operații I/O |
bipartit2.in /bipartit2.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51864633 | Utilizator | |
Fișier | bipartit2.cpp | Dimensiune | 1.21 KB |
Data încărcării | 31 August 2024, 16:44 | Scor / rezultat | Eroare de compilare |
bipartit2.cpp: In function 'int main()': bipartit2.cpp:36:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ bipartit2.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("bipartit2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bipartit2.cpp:39:9: error: reference to 'cin' is ambiguous cin >> w >> q; ^ bipartit2.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("bipartit2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bipartit2.cpp:46:9: error: reference to 'cout' is ambiguous cout << "DA" << '\n'; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit2.cpp:48:27: error: reference to 'cout' is ambiguous if(v[i] == 1) cout << i << " "; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit2.cpp:49:9: error: reference to 'cout' is ambiguous cout << '\n'; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit2.cpp:51:28: error: reference to 'cout' is ambiguous if(v[i] == -1) cout << i << " "; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit2.cpp:52:9: error: reference to 'cout' is ambiguous cout << '\n'; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit2.cpp:54:10: error: reference to 'cout' is ambiguous else cout << "NU"; ^ bipartit2.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("bipartit2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bipartit2.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 Bipartit2 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ă.