#541
Lant1
Se dă lista muchiilor unui graf neorientat și trei vârfuri p q r
. Să se determine un lanț cu extremitățile p q
care conține vârful r
.
Problema | Lant1 | Operații I/O |
lant1.in /lant1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #27669194 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.15 KB |
Data încărcării | 04 Februarie 2021, 20:18 | Scor / rezultat | Eroare de compilare |
lant1.cpp: In function 'int main()': lant1.cpp:40:5: error: reference to 'cin' is ambiguous cin >> n >> p >> q >> r; ^ lant1.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("lant1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lant1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lant1.cpp:41:11: error: reference to 'cin' is ambiguous while(cin >> x >> y) ^ lant1.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("lant1.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lant1.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lant1.cpp:65:5: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ lant1.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("lant1.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lant1.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ lant1.cpp:67:9: error: reference to 'cout' is ambiguous cout << rez[i] << " "; ^ lant1.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("lant1.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lant1.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 Lant1 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ă.