xoranges.cpp: In member function 'void segment_tree::set(int, const int&)':
xoranges.cpp:23:19: warning: suggest parentheses around '-' inside '>>' [-Wparentheses]
23 | i = i - 1 >> 1;
| ~~^~~
xoranges.cpp: In member function 'int segment_tree::get(int, int, int, int, int)':
xoranges.cpp:31:33: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
31 | return get(l, min(r, cl + cr >> 1), (node << 1) + 1, cl, cl + cr >> 1) ^ get(max(l - 1, cl + cr >> 1) + 1, r, (node << 1) + 2, (cl + cr >> 1) + 1, cr);
| ~~~^~~~
xoranges.cpp:31:69: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
31 | return get(l, min(r, cl + cr >> 1), (node << 1) + 1, cl, cl + cr >> 1) ^ get(max(l - 1, cl + cr >> 1) + 1, r, (node << 1) + 2, (cl + cr >> 1) + 1, cr);
| ~~~^~~~
xoranges.cpp:31:100: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
31 | return get(l, min(r, cl + cr >> 1), (node << 1) + 1, cl, cl + cr >> 1) ^ get(max(l - 1, cl + cr >> 1) + 1, r, (node << 1) + 2, (cl + cr >> 1) + 1, cr);
| ~~~^~~~
xoranges.cpp:31:140: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
31 | return get(l, min(r, cl + cr >> 1), (node << 1) + 1, cl, cl + cr >> 1) ^ get(max(l - 1, cl + cr >> 1) + 1, r, (node << 1) + 2, (cl + cr >> 1) + 1, cr);
| ~~~^~~~
xoranges.cpp: In function 'int main()':
xoranges.cpp:52:21: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
52 | if (--x - --i & 1) printf("0\n");
| ~~~~^~~~~
xoranges.cpp:38:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
38 | scanf("%d%d", &n, &q);
| ~~~~~^~~~~~~~~~~~~~~~
xoranges.cpp:41:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
41 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~
xoranges.cpp:46:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
46 | scanf("%d%d%d", &n, &i, &x);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~