nicegift.cpp: In function 'int main()':
nicegift.cpp:20:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq.size()>=k)
~~~~~~~~~^~~
nicegift.cpp:31:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq1.size()>=k)
~~~~~~~~~~^~~
nicegift.cpp:44:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq.size()>=k)
~~~~~~~~~^~~
nicegift.cpp:52:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pq1.size()>=k)
~~~~~~~~~~^~~
nicegift.cpp:13:12: warning: unused variable 't' [-Wunused-variable]
long long t,sum=0,s1=0;
^
nicegift.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld",&n,&k);
~~~~~^~~~~~~~~~~~~~~~~~
nicegift.cpp:16: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",&a[i].first); sum+=a[i].first; a[i].second=i+1;}
~~~~~^~~~~~~~~~~~~~~~~~~~