#1551
DSLM
Se dă mulțimea V
a arcelor unui graf orientat cu n
vârfuri.
Să se determine drumul simplu de lungime maximă cu extremitatea inițială în vârful p
din graf.
folclor
Problema | DSLM | Operații I/O |
dslm.in /dslm.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 2 MB
|
Id soluție | #33667801 | Utilizator | |
Fișier | dslm.cpp | Dimensiune | 844 B |
Data încărcării | 04 Ianuarie 2022, 22:26 | Scor / rezultat | Eroare de compilare |
dslm.cpp: In function 'void afisare(int)': dslm.cpp:10:9: error: reference to 'cout' is ambiguous cout << x[i] << " "; ^ dslm.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("dslm.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dslm.cpp:2: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ dslm.cpp:11:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ dslm.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("dslm.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dslm.cpp:2: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ dslm.cpp: In function 'int main()': dslm.cpp:34:5: error: reference to 'cin' is ambiguous cin >> n >> P; ^ dslm.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("dslm.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dslm.cpp:2: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dslm.cpp:35:11: error: reference to 'cin' is ambiguous while(cin >> x1 >> y) a[x1][y] = 1; ^ dslm.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("dslm.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dslm.cpp:2: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dslm.cpp:40:9: error: reference to 'cout' is ambiguous cout << re[i] << " "; ^ dslm.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("dslm.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from dslm.cpp:2: /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 DSLM 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ă.