walk.cpp:9:13: error: conflicting declaration 'std::vector<int> w [2000007]'
9 | vector<int> w[MAXN];
| ^
walk.cpp:7:21: note: previous declaration as 'int w'
7 | int n,m,z,minv,last,w;
| ^
walk.cpp: In function 'void dijkstra()':
walk.cpp:35:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
35 | for(int i=0;i<v[minv].size();i++){
| ~^~~~~~~~~~~~~~~
walk.cpp: In function 'long long int min_distance(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, int, int)':
walk.cpp:54:14: error: invalid types 'int[int]' for array subscript
54 | w[f].push_back(y[i]);
| ^
walk.cpp:59:26: error: invalid types 'int[int]' for array subscript
59 | if(i==s or i==g)w[i].push_back(0);
| ^
walk.cpp:60:14: error: invalid types 'int[int]' for array subscript
60 | if(!w[i].empty())sort(w[i].begin(),w[i].end());
| ^
walk.cpp:60:32: error: invalid types 'int[int]' for array subscript
60 | if(!w[i].empty())sort(w[i].begin(),w[i].end());
| ^
walk.cpp:60:45: error: invalid types 'int[int]' for array subscript
60 | if(!w[i].empty())sort(w[i].begin(),w[i].end());
| ^
walk.cpp:62:24: error: invalid types 'int[int]' for array subscript
62 | for(int f=0;f<w[i].size()-1;f++){
| ^
walk.cpp:63:32: error: invalid types 'int[int]' for array subscript
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^
walk.cpp:63:24: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from walk.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
walk.cpp:63:51: error: invalid types 'int[int]' for array subscript
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^
walk.cpp:63:43: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from walk.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
walk.cpp:63:63: error: invalid types 'int[int]' for array subscript
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^
walk.cpp:63:73: error: invalid types 'int[int]' for array subscript
63 | add_edge(mp[{x[i],w[i][f]}],mp[{x[i],w[i][f+1]}],w[i][f+1]-w[i][f]);
| ^