#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 | #42779590 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.13 KB |
Data încărcării | 16 Martie 2023, 20:39 | Scor / rezultat | Eroare de compilare |
lant1.cpp: In function 'int main()': lant1.cpp:30:5: error: reference to 'cin' is ambiguous cin >> n >> p >> q >> r; ^ lant1.cpp:3: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:31:11: error: reference to 'cin' is ambiguous while(cin >> x >> y) ^ lant1.cpp:3: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:53:5: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ lant1.cpp:4: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:55:9: error: reference to 'cout' is ambiguous cout << rez[i] << " "; ^ lant1.cpp:4: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ă.