nicegift.cpp: In function 'int main()':
nicegift.cpp:9:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq.size()>=k)
~~~~~~~~~^~~
nicegift.cpp:19:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq1.size()>=k)
~~~~~~~~~~^~~
nicegift.cpp:6: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:8: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("%d",&t); pq.push(make_pair(t,i+1)); pq1.push(make_pair(t,i+1));}
~~~~~^~~~~~~~~