foo.cc: In function 'void build(int&, int, int)':
foo.cc:51:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1;
~^~
foo.cc: In function 'void modify(int&, int, int, int, int)':
foo.cc:70:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1;
~^~
foo.cc: In function 'void query(int, int, int, int, int)':
foo.cc:82:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1;
~^~
foo.cc: In function 'int main()':
foo.cc:149:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:151:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&u,&v);
~~~~~^~~~~~~~~~~~~~
foo.cc:157:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&m);
~~~~~^~~~~~~~~
foo.cc:159:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&w[i],&loc[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:162:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&q,&k);
~~~~~^~~~~~~~~~~~~~
foo.cc:165:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&t,&x,&y);
~~~~~^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务