foo.cc: In function 'void init()':
foo.cc:35:44: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (tmp[a[j]] > cnt || tmp[a[j]] == cnt && a[j] < cur) {
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
foo.cc: In function 'int query(int, int)':
foo.cc:59:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (tmp > cnt || tmp == cnt && a[i] < cur) {
~~~~~~~~~~~^~~~~~~~~~~~~
foo.cc:66:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (tmp > cnt || tmp == cnt && a[i] < cur) {
~~~~~~~~~~~^~~~~~~~~~~~~
foo.cc:74:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (tmp > cnt || tmp == cnt && a[i] < cur) {
~~~~~~~~~~~^~~~~~~~~~~~~
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:85:50: 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]), san[i] = a[i];
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
foo.cc:95:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &l, &r);
~~~~~^~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务