bank.cpp: In lambda function:
bank.cpp:26:45: error: expected ';' before 'if'
26 | int b = bs[new_state[0]]; ++new_state[0]
| ^
| ;
27 | if (self(self, new_state, a_sum, b_sum - b)) {
| ~~
bank.cpp: In function 'int main()':
bank.cpp:51:19: error: no match for call to '(main()::<lambda(auto:16&&, const std::array<int, 21>&, int, int)>) (main()::<lambda(auto:16&&, const std::array<int, 21>&, int, int)>&, std::array<int, 21>&)'
51 | bool ans = brute(brute, state);
| ~~~~~^~~~~~~~~~~~~~
bank.cpp:17:16: note: candidate: 'template<class auto:16> main()::<lambda(auto:16&&, const std::array<int, 21>&, int, int)>'
17 | auto brute = [&](auto&& self, const std::array<int, 21>& state, int a_sum, int b_sum) -> bool {
| ^
bank.cpp:17:16: note: template argument deduction/substitution failed:
bank.cpp:51:19: note: candidate expects 4 arguments, 2 provided
51 | bool ans = brute(brute, state);
| ~~~~~^~~~~~~~~~~~~~