K closets points towards origin

I have written the code and it got accepted on leetcode and here it fails test case .PLz reply quickly(TA’s)

Here is the link

@vdeepu028 your code seems fine, I also downloaded the testcase and code worked fine with it, seems some backend issue so don’t worry!
Your code is fine

@mayankA47 Still test case 0 is not passing can u please send me the test case.
Thanks
Divyanshu verma

@vdeepu028 you can download it yourself from here in solution section
https://hack.codingblocks.com/app/contests/1290/1673/problem

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.

still the problem is not solved can u please give me the test cases as if i unlock it i wont be able to proceed in my course or can you raise query regarding this question

@vdeepu028 you can proceed in course by unlocking test case yourself, you will not get points only for this problem then, also as I said, your code appears fine, I have forwarded the issue to problem setter and will get back to you as I receive update on it.

@vdeepu028 in problem, you have to print top k closest points such that there relative order is maintained, and then sort them!
For example: let A,B,C,D be 4 points, all equidistant, then for K=3, take first three
A,B,C (you should omit only D and not any other point!),
after this sort A,B,C and then print!

Plz look at my code if written condition add only when new distance< distace top;