Sort 5 Discussions, By:
Please Login in order to post a comment
For output a/b, does it want a*b mod (10^9 + 7)? It says Q^(-1) which is confusing because ab^(-1) = a/b.
Can somebody clearify output format?
It says P X Q(-1) mod (10^9 + 7), which makes very little sense as sample output is just single number, e.g. if I try 1.0000 instead - it will be wrong. Plus as number of cells is restricted to 40 x 40, final result will never be over 1600; which makes mod statement somehow reflecting precision of result.
Dynamic Programming times out. Must be a better way.
Markov Chains ?
Adjacent squares are squares that share an edge.
Why are there at most fleas per cell in the sample?
No more comments