Problem dijkstra
User Curiocodeexplorer
Submission Time 2023-11-16 10:08:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:7:7: error: ‘snyc_with_stdio’ is not a member of ‘std::ios’ {aka ‘std::basic_ios<char>’}
7 | ios::snyc_with_stdio(0);cin.tie(0);
| ^~~~~~~~~~~~~~~
dijkstra.cpp:26:44: error: expected ‘)’ before ‘;’ token
26 | dist[i.first] = dist[node] + edgeweight;
| ^
| )
dijkstra.cpp:25:7: note: to match this ‘(’
25 | if (dist[i.first] == -1 or dist[node] + edgeweight;
| ^
dijkstra.cpp: At global scope:
dijkstra.cpp:31:2: error: ‘cout’ does not name a type
31 | cout<<dist[v];
| ^~~~
dijkstra.cpp:32:2: error: expected unqualified-id before ‘return’
32 | return 0;
| ^~~~~~
dijkstra.cpp:33:1: error: expected declaration before ‘}’ token
33 | }
| ^