prog.cpp:4:19: error: wrong number of template arguments (1, should be at least 2)
map<pair<int,int> >m;
^
In file included from /usr/include/c++/6/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:81,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_map.h:96:11: note: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
class map
^~~
prog.cpp: In function ‘void bfs(int)’:
prog.cpp:20:27: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘std::pair<int, int>’)
vis[*it]=m[make_pair(x,*it)];
^
prog.cpp: In function ‘int main()’:
prog.cpp:44:14: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘std::pair<int, int>’)
m[make_pair(a,b)]=w;
^
prog.cpp:45:14: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘std::pair<int, int>’)
m[make_pair(b,a)]=w;
^