Page 1 of 1
11864 - Probability Calculation
Posted: Thu Sep 11, 2014 12:31 am
Use this thread to discuss this problem.
Re: 11864 - Probability Calculation
Posted: Sat Feb 25, 2017 10:59 pm
OK, I've figured out how for a given M to split the sum into two parts. The first part can be cached independent of M (for given p), the other part is dependent on M, and has to be recalculated for every M (again, for given fixed p). I get TLE. Is this the approach you took? Do you answer each query in O(M) time?