Test cases not passing

The test cases aren’t passing eventhough it shows correct output in the IDE. I have even taken care of the overflow if any. Please Check.
link: https://ide.codingblocks.com/s/262993

hello @rmukhopadhyay_be17
image
here u pushing d everytime .
but u missed one case where we should not push d.

the case is maxheap.size()==k and d> maxheap.top()