foo.cc: In function 'int main()':
foo.cc:12:14: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'long long int*' [-Wformat=]
12 | scanf("%ld", &a[i]);
| ~~^ ~~~~~
| | |
| | long long int*
| long int*
| %lld
foo.cc:31:13: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=]
31 | printf("%ld", num);
| ~~^ ~~~
| | |
| | long long int
| long int
| %lld
foo.cc:8:18: warning: unused variable 'm' [-Wunused-variable]
8 | int i, j, k, n, m;
| ^
foo.cc:9:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~
foo.cc:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
12 | scanf("%ld", &a[i]);
| ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务