#1604
DMin
Se consideră un graf neorientat conex cu n
vârfuri, numerotate de la 1
la n
, şi m
muchii. Definim distanţa minimă dintre două noduri x
şi y
ca fiind numărul minim de muchii al unui lanţ elementar care uneşte x
cu y
.
Se dau k
perechi de vârfuri x y
. Determinați pentru fiecare pereche distanța de la x
la y
.
Problema | DMin | Operații I/O |
dmin.in /dmin.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48438353 | Utilizator | |
Fișier | dmin.cpp | Dimensiune | 1.01 KB |
Data încărcării | 25 Ianuarie 2024, 16:32 | Scor / rezultat | Eroare de compilare |
dmin.cpp: In function 'int main()': dmin.cpp:38:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ dmin.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dmin.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:41:9: error: reference to 'cin' is ambiguous cin >> x >> y; ^ dmin.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dmin.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:48:5: error: reference to 'cin' is ambiguous cin >> p; ^ dmin.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dmin.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:51:9: error: reference to 'cin' is ambiguous cin >> x >> y; ^ dmin.cpp:7:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dmin.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:54:9: error: reference to 'cout' is ambiguous cout << d[y] - 1<< '\n'; ^ dmin.cpp:8:10: note: candidates are: std::ofstream cout ofstream cout("dmin.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dmin.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 DMin 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ă.