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