stove.cpp: In function 'int main()':
stove.cpp:14:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
14 | for(int i = 0; i<k-1; ++i) ans += pq.top().first; pq.pop();
| ^~~
stove.cpp:14:52: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
14 | for(int i = 0; i<k-1; ++i) ans += pq.top().first; pq.pop();
| ^~
stove.cpp:7:17: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
7 | int n, k; scanf("%d %d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~
stove.cpp:8:32: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | for(int i = 0; i<n; ++i) scanf("%d", a+i);
| ~~~~~^~~~~~~~~~~