foo.cc: In function 'void build(int, int, int)':
foo.cc:51:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1;
~^~
foo.cc: In function 'void update(int, int, int, int)':
foo.cc:149:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=L+R>>1;
~^~
foo.cc: In function 'int query1(int, int, int)':
foo.cc:162:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=L+R>>1;
~^~
foo.cc: In function 'int query2(int, int, int)':
foo.cc:176:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=L+R>>1;
~^~
foo.cc: In function 'int main()':
foo.cc:188:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
sc(n),sc(m);
^
foo.cc:188:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
foo.cc:6:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define sc(x) scanf("%d",&x)
~~~~~^~~~~~~~~
foo.cc:189:28: note: in expansion of macro 'sc'
for(int i=1;i<=n;i++) sc(a[i]);
^~
foo.cc:194:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
sc(op),sc(l),sc(r);
^
foo.cc:194:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
foo.cc:194:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
[Hydro](https://hydro.ac)提供评测服务