nicegift.cpp: In function 'int main()':
nicegift.cpp:12:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d%d",&n,&k);
~~ ^
nicegift.cpp:12:20: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
nicegift.cpp:17:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq.size()>=k)
~~~~~~~~~^~~
nicegift.cpp:25:19: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%d\n",cnt);
^
nicegift.cpp:26:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq1.size()>=k)
~~~~~~~~~~^~~
nicegift.cpp:39:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq.size()>=k)
~~~~~~~~~^~~
nicegift.cpp:47:19: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%d\n",cnt);
^
nicegift.cpp:48:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq1.size()>=k)
~~~~~~~~~~^~~
nicegift.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&k);
~~~~~^~~~~~~~~~~~~~
nicegift.cpp:14:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=0;i<n;i++) {scanf("%lld",&t); pq.push(make_pair(t,i+1)); pq1.push(make_pair(t,i+1)); sum+=t;}
~~~~~^~~~~~~~~~~