Hi guys, Am trying to solve the problem 492 D. http://codeforces.net/problemset/problem/492/D. My approach is use binary search, to find the index at which the monster dies. My solution is https://ide.geeksforgeeks.org/Dcs5Fn6w2S. But i got wrong answer in test 7. so i changed the equal function to compare upto 10^-6. Then i got wrong answer on test 6. Can someone plz tell me why this method fails.