I am not getting my mistake in this question. I am trying to find out the circle whose y co-ordinate is maximum and also new circle is touching this circle and then calculating y co-ordinate of new circle. Here is link to my code. http://codeforces.com/contest/908/submission/33866310