Maximum circles - greedy

First test case shows runtime error.
when i submit my problem all the test cases except for the first one pass.
whats wrong with my code?
link to my code :
https://ide.codingblocks.com/s/65326

Hi

Please refer to this solution https://ide.codingblocks.com/s/17180
Post if you still have doubts.
Hit like if you get it!.

can u figure out the flaws in my code

Hi
For that please provide a explanation of what you are trying to do actually.
Please explain your logic.