foo.cc: In function 'int main()':
foo.cc:20:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
20 | 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", &a[i]);
| ~~~~~^~~~~~~~~~~~~
foo.cc:17:8: warning: iteration 1000009 invokes undefined behavior [-Waggressive-loop-optimizations]
17 | f[i] = i;
| ~~~~~^~~
foo.cc:16:20: note: within this loop
16 | for (int i = 1; i <= maxn; i++) //初始化f数组为它本身
| ~~^~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务