bank.cpp: In function 'int32_t main()':
bank.cpp:29:48: warning: suggest parentheses around '-' inside '>>' [-Wparentheses]
29 | for (int i = 1; i <= m; ++i) if ((t >> i - 1) & i) val += b[i];
| ~~^~~
bank.cpp:15:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | freopen("duck.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
bank.cpp:16:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | freopen("duck.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~