Https://ide.codingblocks.com/s/360248

please tell me where am i doing wrong

Hey @sauravzt7

     priority_queue<ll>pq; //made ll
    for(int i=0;i<k;i++)
     pq.push(LLONG_MAX); //updated this

Do the above 2 changes and it will work fine

If this resolves your query then please mark it a resolved :slight_smile: