treasure.cpp: In function 'int q(int, int, int, int)':
treasure.cpp:8:23: error: 'N' was not declared in this scope
8 | if(a==1&&b==1&&d==N&&M.count({1, 1, N, N}) && M.count({c+1, 1, N, N})) {
| ^
treasure.cpp:8:46: error: no matching function for call to 'std::map<std::array<int, 4>, int>::count(<brace-enclosed initializer list>)'
8 | if(a==1&&b==1&&d==N&&M.count({1, 1, N, N}) && M.count({c+1, 1, N, N})) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from treasure.cpp:1:
/usr/include/c++/10/bits/stl_map.h:1215:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::count(const key_type&) const [with _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
1215 | count(const key_type& __x) const
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1215:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::array<int, 4>&'}
1215 | count(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:1221:2: note: candidate: 'template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = _Kt; _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >]'
1221 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1221:2: note: template argument deduction/substitution failed:
treasure.cpp:8:46: note: couldn't deduce template parameter '_Kt'
8 | if(a==1&&b==1&&d==N&&M.count({1, 1, N, N}) && M.count({c+1, 1, N, N})) {
| ^
treasure.cpp:8:73: error: no matching function for call to 'std::map<std::array<int, 4>, int>::count(<brace-enclosed initializer list>)'
8 | if(a==1&&b==1&&d==N&&M.count({1, 1, N, N}) && M.count({c+1, 1, N, N})) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from treasure.cpp:1:
/usr/include/c++/10/bits/stl_map.h:1215:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::count(const key_type&) const [with _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
1215 | count(const key_type& __x) const
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1215:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::array<int, 4>&'}
1215 | count(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:1221:2: note: candidate: 'template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = _Kt; _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >]'
1221 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1221:2: note: template argument deduction/substitution failed:
treasure.cpp:8:73: note: couldn't deduce template parameter '_Kt'
8 | if(a==1&&b==1&&d==N&&M.count({1, 1, N, N}) && M.count({c+1, 1, N, N})) {
| ^
treasure.cpp:9:17: error: no match for 'operator[]' (operand types are 'std::map<std::array<int, 4>, int>' and '<brace-enclosed initializer list>')
9 | return M[{1, 1, N, N}] - M[{c+1, 1, N, N}];
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from treasure.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::array<int, 4>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: '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::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::array<int, 4>, int>::key_type&&' {aka 'std::array<int, 4>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
treasure.cpp:9:35: error: no match for 'operator[]' (operand types are 'std::map<std::array<int, 4>, int>' and '<brace-enclosed initializer list>')
9 | return M[{1, 1, N, N}] - M[{c+1, 1, N, N}];
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from treasure.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::array<int, 4>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: '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::array<int, 4>; _Tp = int; _Compare = std::less<std::array<int, 4> >; _Alloc = std::allocator<std::pair<const std::array<int, 4>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 4>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::array<int, 4>, int>::key_type&&' {aka 'std::array<int, 4>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~