mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:22:13: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
22 | arr[res>>1&1^t].push_back(pt);
| ~~~~~~^~
mushrooms.cpp:23:24: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
23 | if (pt+1 < N) arr[res&1^t].push_back(pt+1);
| ~~~^~
mushrooms.cpp:25:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
25 | if (arr[0].size() >= K || arr[1].size() >= K) break;
| ~~~~~~~~~~~~~~^~~~
mushrooms.cpp:25:43: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
25 | if (arr[0].size() >= K || arr[1].size() >= K) break;
| ~~~~~~~~~~~~~~^~~~
mushrooms.cpp:30:25: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
30 | int t = arr[1].size() >= K;
| ~~~~~~~~~~~~~~^~~~
mushrooms.cpp:37:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
37 | int cnt = res+1>>1;
| ~~~^~