#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 | #28347288 | Utilizator | |
Fișier | dslm.cpp | Dimensiune | 837 B |
Data încărcării | 02 Martie 2021, 20:33 | Scor / rezultat | Eroare de compilare |
dslm.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("dslm.in"); ^ dslm.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("dslm.out"); ^ dslm.cpp: In function 'void afisare(int)': dslm.cpp:9:9: error: reference to 'cout' is ambiguous cout << x[i] << " "; ^ dslm.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("dslm.out"); ^ In file included from dslm.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ dslm.cpp:10:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ dslm.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("dslm.out"); ^ In file included from dslm.cpp:1:0: /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:33:5: error: reference to 'cin' is ambiguous cin >> n >> P; ^ dslm.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("dslm.in"); ^ In file included from dslm.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dslm.cpp:34:11: error: reference to 'cin' is ambiguous while(cin >> x1 >> y) a[x1][y] = 1; ^ dslm.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("dslm.in"); ^ In file included from dslm.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ dslm.cpp:39:9: error: reference to 'cout' is ambiguous cout << re[i] << " "; ^ dslm.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("dslm.out"); ^ In file included from dslm.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 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ă.