#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 | #54867974 | Utilizator | |
Fișier | graph.cpp | Dimensiune | 1.12 KB |
Data încărcării | 10 Decembrie 2024, 19:55 | Scor / rezultat | Eroare de compilare |
graph.cpp: In function 'int main()': graph.cpp:35:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ graph.cpp:6: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:9: error: reference to 'cin' is ambiguous cin >> x >> y >> c; ^ graph.cpp:6: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:43:33: error: reference to 'cout' is ambiguous for(int i = 1; i <= n; ++i, cout << '\n') ^ graph.cpp:7: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:46:17: error: reference to 'cout' is ambiguous cout << a[i][j] << ' '; ^ graph.cpp:7: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:47:18: error: reference to 'cout' is ambiguous else cout << 'x' << ' '; ^ graph.cpp:7: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ă.