dreaming.cpp:38:19: error: wrong number of template arguments (1, should be at least 2)
map<pair<int,int> >cost;
^
In file included from /usr/include/c++/7/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_map.h:99:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
class map
^~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:40:6: error: assignment of read-only variable 'N'
N = n;
^
dreaming.cpp:41:2: error: 'M' was not declared in this scope
M = m;
^
dreaming.cpp:42:2: error: 'L' was not declared in this scope
L = l;
^
dreaming.cpp:46:7: error: no match for 'operator[]' (operand types are 'int' and 'std::pair<int, int>')
cost[make_pair(A[i], B[i])] = cost[make_pair(B[i], A[i])] = T[i];
^
dreaming.cpp:46:37: error: no match for 'operator[]' (operand types are 'int' and 'std::pair<int, int>')
cost[make_pair(A[i], B[i])] = cost[make_pair(B[i], A[i])] = T[i];
^
dreaming.cpp:63:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j = 1; j < path.size(); j++) {
~~^~~~~~~~~~~~~
dreaming.cpp:64:15: error: no match for 'operator[]' (operand types are 'int' and 'std::pair<int, int>')
cur -= cost[make_pair(path[j], path[j - 1])];
^