nicegift.cpp: In function 'int main()':
nicegift.cpp:9:17: warning: comparison of integer expressions of different signedness: 'std::priority_queue<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
9 | while(pq.size()>=k)
| ~~~~~~~~~^~~
nicegift.cpp:18:18: warning: comparison of integer expressions of different signedness: 'std::priority_queue<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
18 | 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]
6 | 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]
8 | for(int i=0;i<n;i++) {scanf("%d",&t); mx=max(mx,t); sum+=t; pq.push(make_pair(t,i+1)); pq1.push(make_pair(t,i+1));}
| ~~~~~^~~~~~~~~