#538
LungimeMinima
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și vârf p
. Să se determine toate nodurile q
ale grafului cu proprietatea că lungimea minimă a unui lanț de la q
la p
este L
.
Problema | LungimeMinima | Operații I/O |
lungimeminima.in /lungimeminima.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #28647298 | Utilizator | |
Fișier | lungimeminima.cpp | Dimensiune | 882 B |
Data încărcării | 13 Martie 2021, 08:26 | Scor / rezultat | Eroare de compilare |
lungimeminima.cpp: In function 'int main()': lungimeminima.cpp:33:5: error: reference to 'cin' is ambiguous cin >> n >> p >> L; ^ lungimeminima.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("lungimeminima.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lungimeminima.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lungimeminima.cpp:35:11: error: reference to 'cin' is ambiguous while(cin >> x >> y) ^ lungimeminima.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("lungimeminima.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lungimeminima.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lungimeminima.cpp:45:5: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ lungimeminima.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("lungimeminima.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lungimeminima.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ lungimeminima.cpp:47:27: error: reference to 'cout' is ambiguous if(d[i] == L + 1) cout << i << " "; ^ lungimeminima.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("lungimeminima.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from lungimeminima.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 LungimeMinima 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ă.