#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 | #48438388 | Utilizator | |
Fișier | dmin.cpp | Dimensiune | 1.08 KB |
Data încărcării | 25 Ianuarie 2024, 16:33 | Scor / rezultat | Eroare de compilare |
dmin.cpp: In function 'int main()': dmin.cpp:41:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ dmin.cpp:10:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from dmin.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:44:9: error: reference to 'cin' is ambiguous cin >> x >> y; ^ dmin.cpp:10:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from dmin.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:50:39: error: 'sort' was not declared in this scope sort(G[i].begin() , G[i].end()); ^ dmin.cpp:51:5: error: reference to 'cin' is ambiguous cin >> p; ^ dmin.cpp:10:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from dmin.cpp:1:0: /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 'cin' is ambiguous cin >> x >> y; ^ dmin.cpp:10:10: note: candidates are: std::ifstream cin ifstream cin("dmin.in"); ^ In file included from dmin.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dmin.cpp:57:9: error: reference to 'cout' is ambiguous cout << d[y] - 1<< '\n'; ^ dmin.cpp:11:10: note: candidates are: std::ofstream cout ofstream cout("dmin.out"); ^ In file included from dmin.cpp:1:0: /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ă.