foo.cc: In function 'int main()':
foo.cc:17:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | int n; scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:24:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
24 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:19:31: warning: iteration 2000009 invokes undefined behavior [-Waggressive-loop-optimizations]
19 | for(int i=1; i<=N; i++) p[i] = i;
| ~~~~~^~~
foo.cc:19:16: note: within this loop
19 | for(int i=1; i<=N; i++) p[i] = i;
| ~^~~
[Hydro](https://hydro.ac)提供评测服务