foo.cc: In function 'void build(int, int, int)':
foo.cc:44:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1; build(ls,l,mid); build(rs,mid+1,r); pushup(p);
~^~
foo.cc: In function 'void change_add(int, int, int, int)':
foo.cc:48:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int L=t[p].l,R=t[p].r,mid=L+R>>1;
~^~
foo.cc: In function 'void change_rev(int, int, int)':
foo.cc:57:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int L=t[p].l,R=t[p].r,mid=L+R>>1;
~^~
foo.cc: In function 'tree ask(int, int, int)':
foo.cc:66:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int L=t[p].l,R=t[p].r,mid=L+R>>1;
~^~
foo.cc: In function 'int main()':
foo.cc:84:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&q);
~~~~~^~~~~~~~~~~~~~
foo.cc:90:39: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;++i) scanf("%d",a+i),a[i]=(a[i]%mod+mod)%mod;
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:95:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",op);
~~~~~^~~~~~~~~
foo.cc:96:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&l,&r);
~~~~~^~~~~~~~~~~~~~
foo.cc:97:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
if(op[0]=='I') scanf("%d",&x),change_add(1,l,r,x);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:99:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
else scanf("%d",&x),printf("%d\n",ask(1,l,r).f[x]);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务