foo.cc: In function 'int main()':
foo.cc:42:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
42 | if (p < x || p == x && ansx > r) x = p, ansx = r, ansy = l;
| ~~~~~~~^~~~~~~~~~~
foo.cc:34:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
34 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
foo.cc:35:39: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
35 | for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务