secret.cpp:16:17: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
16 | const int inf = 1e18;
| ^~~~
secret.cpp: In function 'void cal(int, int)':
secret.cpp:54:19: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and '<brace-enclosed initializer list>')
54 | is[{i,m}] = 1;
| ^
In file included from /usr/include/c++/13/map:63,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152,
from secret.cpp:2:
/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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = 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 '<brace-enclosed initializer list>' to 'const std::map<int, int>::key_type&' {aka 'const 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
secret.cpp:60:19: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and '<brace-enclosed initializer list>')
60 | is[{m+1,i}] = 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = 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 '<brace-enclosed initializer list>' to 'const std::map<int, int>::key_type&' {aka 'const 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
secret.cpp: In function 'void Init(int, int*)':
secret.cpp:77:19: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and '<brace-enclosed initializer list>')
77 | is[{i,i}] = 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = 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 '<brace-enclosed initializer list>' to 'const std::map<int, int>::key_type&' {aka 'const 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
secret.cpp: In function 'int Query(int, int)':
secret.cpp:88:22: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and '<brace-enclosed initializer list>')
88 | if(is[{L,i}] and is[{i+1,R}]){
| ^
/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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = 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 '<brace-enclosed initializer list>' to 'const std::map<int, int>::key_type&' {aka 'const 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
secret.cpp:88:36: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and '<brace-enclosed initializer list>')
88 | if(is[{L,i}] and is[{i+1,R}]){
| ^
/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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = 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 '<brace-enclosed initializer list>' to 'const std::map<int, int>::key_type&' {aka 'const 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 = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
secret.cpp:93:1: warning: control reaches end of non-void function [-Wreturn-type]
93 | }
| ^