foo.cc: In function 'void build(int, int, int)':
foo.cc:17:10: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
ll mid=l+r>>1;
~^~
foo.cc: In function 'void update_sqrt(long long int, long long int, long long int)':
foo.cc:49:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
ll mid=tree[o].r+tree[o].l>>1;
~~~~~~~~~^~~~~~~~~~
foo.cc: In function 'long long int query(long long int, long long int, long long int)':
foo.cc:62:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
ll mid=tree[o].l+tree[o].r>>1;
~~~~~~~~~^~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:73:26: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d%d%d",&z,&b,&c);
~~ ^
foo.cc:73:26: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
foo.cc:73:26: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long long int*' [-Wformat=]
foo.cc:68:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&n);
~~~~~^~~~~~~~~~~
foo.cc:69:29: 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("%lld",&a[i]);
~~~~~^~~~~~~~~~~~~~
foo.cc:71:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&m);
~~~~~^~~~~~~~~~~
foo.cc:73:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&z,&b,&c);
~~~~~^~~~~~~~~~~~~~~~~~~