lyuboyn.cpp: In function 'std::vector<int> gray_code(int)':
lyuboyn.cpp:34:44: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
34 | for (int i : under) ans.pb(i | (1 << n - 1));
| ~~^~~
lyuboyn.cpp: In function 'int main()':
lyuboyn.cpp:46:11: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
46 | if (k & 1 ^ 1) {
| ~~^~~
lyuboyn.cpp:64:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for (int i = 0; i < leftb.size(); ++i) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:65:37: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
65 | leftb[i] ^= (1 << n - k * 2 - 2);
| ~~~~~~~~~~^~~
lyuboyn.cpp:67:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
67 | for (int i = 0; i < right.size(); ++i) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:68:15: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
68 | if (i & 1 ^ 1) {
| ~~^~~
lyuboyn.cpp:69:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
69 | for (int j = 0; j < lefta.size(); ++j) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:74:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
74 | for (int j = 0; j < leftb.size(); ++j) {
| ~~^~~~~~~~~~~~~~