foo.cc: In function 'int main()':
foo.cc:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d %d",&n,&a[1]);
| ~~~~~^~~~~~~~~~~~~~~~~~
foo.cc:16:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
foo.cc:12:12: warning: 'n' is used uninitialized in this function [-Wuninitialized]
12 | int a[n];
| ^
[Hydro](https://hydro.ac)提供评测服务