Borderou de evaluare (job #2804158)

Utilizator victorzarzuZarzu Victor victorzarzu Data 21 noiembrie 2021 00:24:30
Problema Algoritmul lui Dijkstra Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void solve()': main.cpp:24:5: error: 'dist' was not declared in this scope 24 | dist[i] = oo; | ^~~~ main.cpp:5:16: error: 'const struct std::pair<int, int>' has no member named 'cost' 5 | #define second cost | ^~~~ main.cpp:30:34: note: in expansion of macro 'second' 30 | point node = heap.begin() -> second; | ^~~~~~ main.cpp:33:23: error: no match for 'operator[]' (operand types are 'std::vector<std::pair<int, int> > [50001]' and 'std::pair<int, int>') 33 | for(auto it : graf[node]) | ^ main.cpp:35:10: error: 'dist' was not declared in this scope 35 | if(dist[it.node] > dist[node] + it.cost) | ^~~~ main.cpp:45:9: error: 'dist' was not declared in this scope 45 | g<<(dist[i] == oo ? 0 : dist[i])<<" "; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?