Wrong answer on 492D

Правка en1, от newbie_forever_at_cp, 2017-12-04 18:41:54

Hi guys, Am trying to solve the problem 492 D. http://mirror.codeforces.com/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.

Теги #binary search, #math

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский newbie_forever_at_cp 2017-12-04 18:41:54 422 Initial revision (published)