foo.cc: In function 'int main()':
foo.cc:15:12: warning: unused variable 'j' [-Wunused-variable]
int i, j, tmp;
^
foo.cc:15:15: warning: unused variable 'tmp' [-Wunused-variable]
int i, j, tmp;
^~~
foo.cc:20:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~
foo.cc:22:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &arr[0]);
~~~~~^~~~~~~~~~~~~~~
foo.cc:27:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &arr[i]);
~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务