#4290
GasesteCiclu
Se dă un graf neorientat cu n
vârfuri numerotate de la 1
la n
și m
muchii. Știind că graful are cel puțin un ciclu, să se determine un ciclu elementar în acest graf.
Problema | GasesteCiclu | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53715682 | Utilizator | |
Fișier | gasesteciclu.cpp | Dimensiune | 1.84 KB |
Data încărcării | 09 Noiembrie 2024, 13:48 | Scor / rezultat | Eroare de compilare |
gasesteciclu.cpp:9:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("lol.in"); ^ gasesteciclu.cpp:10:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("lol.out"); ^ gasesteciclu.cpp: In function 'void gasit(int, int)': gasesteciclu.cpp:19:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<=bf.size()-1; ++i) ^ gasesteciclu.cpp:24:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=poz; i<=bf.size()-1; ++i) ^ gasesteciclu.cpp:25:9: error: reference to 'cout' is ambiguous cout<<bf[i]<<' '; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp:26:9: error: reference to 'cout' is ambiguous cout<<bf[poz]; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp: In function 'void AfisGraf(std::vector<int>*)': gasesteciclu.cpp:68:9: error: reference to 'cout' is ambiguous cout<<sursa<<':'; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp:70:17: error: reference to 'cout' is ambiguous cout<<vecin<<' '; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp:72:9: error: reference to 'cout' is ambiguous cout<<'\n'; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp:74:5: error: reference to 'cout' is ambiguous cout<<'\n'; ^ gasesteciclu.cpp:10:10: note: candidates are: <typeprefixerror>cout ofstream cout("lol.out"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ gasesteciclu.cpp: In function 'int main()': gasesteciclu.cpp:79:5: error: reference to 'cin' is ambiguous cin>>n>>m; ^ gasesteciclu.cpp:9:10: note: candidates are: <typeprefixerror>cin ifstream cin("lol.in"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ gasesteciclu.cpp:82:9: error: reference to 'cin' is ambiguous cin>>x>>y; ^ gasesteciclu.cpp:9:10: note: candidates are: <typeprefixerror>cin ifstream cin("lol.in"); ^ In file included from gasesteciclu.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GasesteCiclu 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ă.