Problem dijkstra
User VNHbest
Submission Time 2024-03-27 20:05:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dijkstra.cpp: In function ‘int main()’:
dijkstra.cpp:24:47: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair<long long int, long long int> > >, std::vector<std::pair<long long int, long long int> > >::value_type’ {aka ‘std::vector<std::pair<long long int, long long int> >’} and ‘std::pair<long long int, long long int>’)
24 | long long cpoint = vec[fpoint][i].second;
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from dijkstra.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candi