Main.cpp:21:15: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
21 | const int inf=1e18;
| ^~~~
Main.cpp:23:19: warning: overflow in conversion from 'long int' to 'int' changes value from '1000000001237' to '-727378731' [-Woverflow]
23 | const int HASHMOD=1000000001237;
| ^~~~~~~~~~~~~
Main.cpp: In function 'void dfs(int)':
Main.cpp:70:35: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and 'int')
70 | int q=tot[x][dep[u]]-mp[x][cor[x]][dep[u]];
| ^
In file included from /usr/include/c++/13/map:63,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152,
from Main.cpp:1:
/usr/include/c++/13/bits/stl_map.h:504: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> >; mapped_type = int; key_type = std::pair<int, int>]'
504 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:504:34: note: no known conversion for argument 1 from 'int' to 'const std::map<std::pair<int, int>, int>::key_type&' {aka 'const std::pair<int, int>&'}
504 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](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> >; mapped_type = int; key_type = std::pair<int, int>]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from 'int' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~