foo.cc: In member function 'void tree::build(int, int, int)':
foo.cc:25:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
25 | int mid = L + R >> 1;
| ~~^~~
foo.cc: In member function 'void tree::modify(int, int, int, int)':
foo.cc:39:27: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
39 | int mid = nd[p].L + nd[p].R >> 1;
| ~~~~~~~~^~~~~~~~~
foo.cc: In member function 'void tree::query(int, int)':
foo.cc:60:27: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
60 | int mid = nd[p].L + nd[p].R >> 1;
| ~~~~~~~~^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:82:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
82 | scanf("%d %d", &n, &q);
| ~~~~~^~~~~~~~~~~~~~~~~
foo.cc:84:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
84 | scanf("%lld", &a[i]);
| ~~~~~^~~~~~~~~~~~~~~
foo.cc:91:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
91 | scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
foo.cc:94:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
94 | scanf("%d %d %d", &l, &r, &v);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:98:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
98 | scanf("%d %d", &x, &v);
| ~~~~~^~~~~~~~~~~~~~~~~
foo.cc:104:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
104 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务