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:65:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
65 | for (int i = 0; i < lefta.size(); ++i) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:66:41: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
66 | if (lefta[i] == (1 << n - k * 2 - 2)) id = i;
| ~~~~~~~~~~^~~
lyuboyn.cpp:69:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
69 | for (int i = 0; i < right.size(); ++i) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:70:15: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
70 | if (i & 1 ^ 1) {
| ~~^~~
lyuboyn.cpp:71:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
71 | for (int j = 0; j < lefta.size(); ++j) {
| ~~^~~~~~~~~~~~~~
lyuboyn.cpp:76:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for (int j = 0; j < leftb.size(); ++j) {
| ~~^~~~~~~~~~~~~~