Max Circle - Wrong Answer for two test caes

@abhishek_trigunait - for max circle problem two of the test cases are failing .
Could you please suggest me whats wrong in the code .

https://hack.codingblocks.com/contests/c/452/563
https://ide.codingblocks.com/#/s/17566

Your code gives WA for inputs that are unsorted ,like for the sample tc :
4
4 1
3 1
2 1
1 1
It gives 3 instead of 2

1 Like

@abhishek_trigunait my bad - i missed sorting arraylist :frowning: and even failed to find while re-checking . Thanks for the help :slight_smile: .
But now for one of the test case its giving run-error i tried using long as well in place of int .
Could you please suggest ?

https://ide.codingblocks.com/#/s/17569