foo.cc: In function 'int main()':
foo.cc:20:20: warning: unused variable 'p' [-Wunused-variable]
20 | for(int i = 1, p; i <= n; ++i){
| ^
foo.cc:19:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
19 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
foo.cc:21:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
21 | scanf("%d", &num[i]);
| ~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务