mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:16:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
16 | for (int j=0;j<arr[0].size()&&i+j<N;j++){
| ~^~~~~~~~~~~~~~
mushrooms.cpp:28:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | for (int j=0;j<arr[1].size()&&i+j<N;j++){
| ~^~~~~~~~~~~~~~
mushrooms.cpp:35:11: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
35 | arr[res&1^1].push_back(test.back());
| ~~~^~
mushrooms.cpp:43:14: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
43 | arr[res>>1&1^1].push_back(i);
| ~~~~~~^~
mushrooms.cpp:44:11: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
44 | arr[res&1^1].push_back(++i);
| ~~~^~