K closest to origin (Heap)

https://ide.codingblocks.com/s/487986 where is fault in my code, while it pass testcase properly.
Also given sample .output is contradicts its statement so plz correct it

hello @imadarshanand

what issue u are facing in his ?

I think my code is perfect but its not accepted by CB on submission, (1st testcase wrong and 2nd testcase RunError)While my output is right in any testcase, you can check it.

use long long in place of int and then try

Yeah, I checked it, this is fault of CB ide ,bcz my code has accepted by leetcode.

cb checker is not able to validate for multiple correct solutions hence it gives wa

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.