bank.cpp: In function 'bool sol(int, int)':
bank.cpp:17:46: error: no match for 'operator[]' (operand types are 'std::unordered_map<int, bool>' and '<brace-enclosed initializer list>')
17 | if(sol(i+1,used|mask))return memo[{i,used}]=1;
| ^
In file included from /usr/include/c++/11/unordered_map:47,
from /usr/include/c++/11/functional:61,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from bank.cpp:1:
/usr/include/c++/11/bits/unordered_map.h:979:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = bool; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = bool; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]'
979 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/unordered_map.h:979:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const int&'}
979 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/unordered_map.h:983:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = int; _Tp = bool; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = bool; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]'
983 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/unordered_map.h:983:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::unordered_map<int, bool>::key_type&&' {aka 'int&&'}
983 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
bank.cpp:21:16: error: no match for 'operator[]' (operand types are 'std::unordered_map<int, bool>' and '<brace-enclosed initializer list>')
21 | return memo[{i, used}]=0;
| ^
In file included from /usr/include/c++/11/unordered_map:47,
from /usr/include/c++/11/functional:61,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from bank.cpp:1:
/usr/include/c++/11/bits/unordered_map.h:979:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = bool; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = bool; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]'
979 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/unordered_map.h:979:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const int&'}
979 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/unordered_map.h:983:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = int; _Tp = bool; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = bool; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]'
983 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/unordered_map.h:983:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::unordered_map<int, bool>::key_type&&' {aka 'int&&'}
983 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~