foo.c: In function 'main':
foo.c:17:41: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
17 | scanf("%d",&v[ii]);
| ~^ ~~~~~~
| | |
| | long int *
| int *
| %ld
foo.c:8:5: warning: iteration 2000 invokes undefined behavior [-Waggressive-loop-optimizations]
8 | x[i]=0;
| ~~~~^~
foo.c:7:14: note: within this loop
7 | for(int i=1;i<=2001;i++)
| ~^~~~~~
foo.c:8:5: warning: '__builtin_memset' forming offset [8004, 8007] is out of the bounds [0, 8004] of object 'x' with type 'int[2001]' [-Warray-bounds]
8 | x[i]=0;
| ~~~~^~
foo.c:6:5: note: 'x' declared here
6 | int x[2001];
| ^
[Hydro](https://hydro.ac)提供评测服务