Borderou de evaluare (job #2590314)
Utilizator | Data | 27 martie 2020 19:00:00 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:5:16: error: expected ']' before numeric constant
#define lim 50 005
^
main.cpp:12:10: note: in expansion of macro 'lim'
int dist[lim], n, m, parcurs[lim];
^~~
main.cpp: In member function 'bool comp_dist::operator()(int, int)':
main.cpp:18:16: error: 'dist' was not declared in this scope
return dist[x]>dist[y];
^~~~
main.cpp: At global scope:
main.cpp:5:16: error: expected ']' before numeric constant
#define lim 50 005
^
main.cpp:22:28: note: in expansion of macro 'lim'
vector <pair<int, int> > v[lim];
^~~
main.cpp: In function 'void citire()':
main.cpp:27:9: error: 'n' was not declared in this scope
in>>n>>m;
^
main.cpp:27:12: error: 'm' was not declared in this scope
in>>n>>m;
^
main.cpp:32:9: error: 'v' was not declared in this scope
v[x].push_back(make_pair(y, c));
^
main.cpp: In function 'void afisare()':
main.cpp:38:21: error: 'n' was not declared in this scope
for(int i=2; i<=n; ++i)
^
main.cpp:40:12: error: 'dist' was not declared in this scope
if(dist[i]==oo)
^~~~
main.cpp: In function 'void dijkstra()':
main.cpp:54:21: error: 'n' was not declared in this scope
for(int i=2; i<=n; ++i)
^
main.cpp:56:9: error: 'dist' was not declared in this scope
dist[i]=oo;
^~~~
main.cpp:58:5: error: 'dist' was not declared in this scope
dist[1]=0;
^~~~
main.cpp:63:24: error: 'v' was not declared in this scope
for(int i=0; i<v[x].size(); ++i)
^
main.cpp:65:16: error: 'parcurs' was not declared in this scope
if(parcurs[v[x][i].first]==0 && dist[v[x][i].first]>dist[x]+v[x][i].second)
^~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !