foo.cc: In function 'void build(int, int, int)':
foo.cc:49:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
49 | int mid = l + r >> 1;
| ~~^~~
foo.cc: In function 'void update(int, int, int, long long int)':
foo.cc:66:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
66 | int mid = tree[rt].l + tree[rt].r >> 1;
| ~~~~~~~~~~~^~~~~~~~~~~~
foo.cc: In function 'void update1(int, int, long long int)':
foo.cc:78:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
78 | int mid = tree[rt].l + tree[rt].r >> 1;
| ~~~~~~~~~~~^~~~~~~~~~~~
foo.cc: In function 'long long int query(int, int)':
foo.cc:87:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
87 | int mid = tree[rt].l + tree[rt].r >> 1;
| ~~~~~~~~~~~^~~~~~~~~~~~
foo.cc: In function 'void solve()':
foo.cc:94:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
94 | scanf("%d%d", &n, &q);
| ~~~~~^~~~~~~~~~~~~~~~
foo.cc:96:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
96 | scanf("%d", &x[i]);
| ~~~~~^~~~~~~~~~~~~
foo.cc:101:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
101 | scanf("%d", &op);
| ~~~~~^~~~~~~~~~~
foo.cc:103:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
103 | scanf("%d%d%lld", &l, &r, &x);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:106:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
106 | scanf("%d%lld", &l, &x);
| ~~~~~^~~~~~~~~~~~~~~~~~
foo.cc:109:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
109 | scanf("%lld", &x);
| ~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务