#146
graph
Călinuţa tocmai a găsit o foaie de hârtie pe care este desenat un graf orientat aciclic cu N
noduri şi M
arce, fiecare arc având o distanţă de valoare întreagă. Dându-se N
, M
şi cele M
arce cu distanţele dintre ele, trebuie să calculaţi pentru Călinuţa distanţa minimă dintre fiecare două noduri.
Grigore Moisil 2013
Problema | graph | Operații I/O |
graph.in /graph.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54887759 | Utilizator | |
Fișier | graph.cpp | Dimensiune | 1.11 KB |
Data încărcării | 11 Decembrie 2024, 12:17 | Scor / rezultat | Eroare de compilare |
graph.cpp: In function 'int main()': graph.cpp:29:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ graph.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("graph.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graph.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ graph.cpp:31:9: error: reference to 'cin' is ambiguous cin >> x >> y >> c; ^ graph.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("graph.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graph.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ graph.cpp:37:33: error: reference to 'cout' is ambiguous for(int i = 1; i <= n; ++i, cout << '\n') ^ graph.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("graph.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graph.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ graph.cpp:40:17: error: reference to 'cout' is ambiguous cout << a[i][j] << ' '; ^ graph.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("graph.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graph.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ graph.cpp:41:18: error: reference to 'cout' is ambiguous else cout << 'x' << ' '; ^ graph.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("graph.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from graph.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 graph 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ă.