11864 - Probability Calculation

All about problems in Volume 118. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

11864 - Probability Calculation

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!

New poster
Posts: 17
Joined: Fri Oct 21, 2016 12:58 pm
Location: NS, Canada

Re: 11864 - Probability Calculation

Post by dull_jester »

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?

Post Reply

Return to “Volume 118 (11800-11899)”