#472
Bipartit1
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 | Bipartit1 | Operații I/O |
![]() bipartit1.in /bipartit1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50824309 | Utilizator | |
Fișier | bipartit1.cpp | Dimensiune | 1.22 KB |
Data încărcării | 08 Mai 2024, 17:47 | Scor / rezultat | Eroare de compilare |
bipartit1.cpp: In function 'int main()': bipartit1.cpp:42:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ bipartit1.cpp:5: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bipartit1.cpp:45:9: error: reference to 'cin' is ambiguous cin >> w >> q; ^ bipartit1.cpp:5: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bipartit1.cpp:54:9: error: reference to 'cout' is ambiguous cout << "DA" << '\n'; ^ bipartit1.cpp:6: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit1.cpp:56:27: error: reference to 'cout' is ambiguous if(v[i] == 1) cout << i << " "; ^ bipartit1.cpp:6: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit1.cpp:57:9: error: reference to 'cout' is ambiguous cout << '\n'; ^ bipartit1.cpp:6: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit1.cpp:59:28: error: reference to 'cout' is ambiguous if(v[i] == -1) cout << i << " "; ^ bipartit1.cpp:6: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit1.cpp:60:9: error: reference to 'cout' is ambiguous cout << '\n'; ^ bipartit1.cpp:6: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 bipartit1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bipartit1.cpp:62:10: error: reference to 'cout' is ambiguous else cout << "NU"; ^ bipartit1.cpp:6: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 bipartit1.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 Bipartit1 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ă.