0_0_38085837_28546.cpp:22:19: error: 'vector' was not declared in this scope
Dijskra(map<int, vector<int>>&m, map<pair<int, int>, int> &value, int n, int start)
^
0_0_38085837_28546.cpp:22:29: error: template argument 2 is invalid
Dijskra(map<int, vector<int>>&m, map<pair<int, int>, int> &value, int n, int start)
^
0_0_38085837_28546.cpp:22:29: error: template argument 4 is invalid
0_0_38085837_28546.cpp:41:2: error: 'priority_queue' does not name a type
priority_queue< Node, vector< Node>, cmp>que;
^
0_0_38085837_28546.cpp: In constructor 'Dijskra::Dijskra(int&, std::map<std::pair<int, int>, int>&, int, int)':
0_0_38085837_28546.cpp:25:3: error: 'que' was not declared in this scope
que.push({ start,0 });
^
0_0_38085837_28546.cpp:33:28: error: invalid types 'int[int]' for array subscript
for (auto& vi : m[nod.id]) {
^
0_0_38085837_28546.cpp:34:24: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
if (nod.len + value[{nod.id, vi}] < dis[vi]) {
^
0_0_38085837_28546.cpp:34:24: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_38085837_28546.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: 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>]
operator[](const key_type& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: 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>]
operator[](key_type&& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: 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>&&}'
0_0_38085837_28546.cpp:35:46: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
que.push({ vi, dis[vi] = nod.len + value[{nod.id, vi}] });
^
0_0_38085837_28546.cpp:35:46: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_38085837_28546.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: 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>]
operator[](const key_type& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: 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>]
operator[](key_type&& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: 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>&&}'
0_0_38085837_28546.cpp: In function 'int main()':
0_0_38085837_28546.cpp:52:12: error: 'vector' was not declared in this scope
map<int, vector<int>> g;
^
0_0_38085837_28546.cpp:52:22: error: template argument 2 is invalid
map<int, vector<int>> g;
^
0_0_38085837_28546.cpp:52:22: error: template argument 4 is invalid
0_0_38085837_28546.cpp:52:26: error: invalid type in declaration before ';' token
map<int, vector<int>> g;
^
0_0_38085837_28546.cpp:57:7: error: invalid types 'int[int]' for array subscript
g[a].push_back(b), g[b].push_back(a);
^
0_0_38085837_28546.cpp:57:26: error: invalid types 'int[int]' for array subscript
g[a].push_back(b), g[b].push_back(a);
^
|