Doubt in #730 Div. 2's Problem C (Need for Pink Slips):

Правка en1, от GrizzlyGunner, 2021-07-09 06:44:33

Doubt in #730 Div. 2's Problem C (Need for Pink Slips):
Can someone please explain why 1e-10 works in the below line of a solution to Problem C, but 1e-9 doesn't?
Shouldn't they both be working?

if(p * level * prob <= 1e-9) return;

The submissions: 1e-9, 1e-10.
Thanks.

Теги floating-point, epsilon, implementation

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский GrizzlyGunner 2021-07-09 12:00:36 39 Tiny change: 'they both be working?\n\n~~~~~' -> 'they both work?\n\n~~~~~'
en1 Английский GrizzlyGunner 2021-07-09 06:44:33 487 Initial revision (published)