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:32:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for (int i=0;pt+i<N&&i<arr[t].size();i++){
| ~^~~~~~~~~~~~~~
mushrooms.cpp:37:10: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
37 | arr[res&1^t].push_back(test.back());
| ~~~^~
mushrooms.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
38 | int cnt = res+1>>1;
| ~~~^~