For this problem http://codeforces.com/problemset/problem/492/B. I've used a binary search approach to get a solution. However, I'm getting an incorrect result in the floating points for the answer. How can I overcome this.
This is my solution http://codeforces.com/contest/492/submission/17201833