foo.cc: In function 'int main()':
foo.cc:24:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
24 | if(i-1>=0&&a[i]==a[i-1] || i+1<=n&&a[i]==a[i+1]-1)
| ~~~~~~^~~~~~~~~~~~~~
foo.cc:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:18:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务