#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 | #45920055 | Utilizator | |
Fișier | dslm.cpp | Dimensiune | 852 B |
Data încărcării | 25 Octombrie 2023, 16:49 | Scor / rezultat | Eroare de compilare |
dslm.cpp:6:1: error: 'ofsatream' does not name a type ofsatream fout("dslm.out") ^ dslm.cpp: In function 'void afisare(int)': dslm.cpp:13:9: error: 'fout' was not declared in this scope fout << x[i] << " "; ^ dslm.cpp:13:17: error: 'x' was not declared in this scope fout << x[i] << " "; ^ dslm.cpp:14:5: error: 'fout' was not declared in this scope fout << '\n'; ^ dslm.cpp: In function 'void rez(int)': dslm.cpp:19:9: error: 're' was not declared in this scope re[i] = x[i]; ^ dslm.cpp:19:17: error: 'x' was not declared in this scope re[i] = x[i]; ^ dslm.cpp: In function 'void back(int)': dslm.cpp:23:26: error: 'n' was not declared in this scope for(int i = 1 ; i <= n ; i++) ^ dslm.cpp:25:9: error: 'x' was not declared in this scope x[k] = i; ^ dslm.cpp:26:12: error: 'a' was not declared in this scope if(a[x[k - 1]][x[k]] == 1) ^ dslm.cpp:29:20: error: 'kmax' was not declared in this scope if(k > kmax) kmax = k , rez(k); ^ dslm.cpp: In function 'int main()': dslm.cpp:37:12: error: 'n' was not declared in this scope fin >> n >> P; ^ dslm.cpp:37:17: error: 'P' was not declared in this scope fin >> n >> P; ^ dslm.cpp:38:18: error: 'x1' was not declared in this scope while(fin >> x1 >> y) a[x1][y] = 1; ^ dslm.cpp:38:24: error: 'y' was not declared in this scope while(fin >> x1 >> y) a[x1][y] = 1; ^ dslm.cpp:38:27: error: 'a' was not declared in this scope while(fin >> x1 >> y) a[x1][y] = 1; ^ dslm.cpp:39:5: error: 'x' was not declared in this scope x[1] = P; ^ dslm.cpp:40:5: error: 'p' was not declared in this scope p[P] = 1; ^ dslm.cpp:42:26: error: 'kmax' was not declared in this scope for(int i = 1 ; i <= kmax ; i++) ^ dslm.cpp:43:9: error: 'fout' was not declared in this scope fout << re[i] << " "; ^ dslm.cpp:43:17: error: 're' was not declared in this scope fout << re[i] << " "; ^
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ă.