foo.cc: In function 'int main()':
foo.cc:74:41: warning: operation on 'ptr' may be undefined [-Wsequence-point]
ans[qr[ptr].ind]=query(i)-query(qr[ptr++].l-1);
~~~^~
foo.cc:56:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("P1972_1.in","r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:57:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("fuck.out","w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务