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
First of all, you must output using "fixed" floating format, which says to output system to print N digits after the '.'
Also, the problem statement says, that 9 digits are significant in the answer, so it would be better to output using setprecision(9). Double data type gives 15-17 significant digits, so it's enough, I think
UPD: Checker is quite funny, this verdict looks really weird
"fixed" isn't necessary, setprecision(20) is enough for this case.