Probability, Digit, and Counting Dynamic Programming Problems

OSU! Let $E_i$ denote the expected score after the $i$-th operation. The key observation is that $(x+1)^3 - x^3 = 3x^2 + 3x + 1$. To compute this increment in expectation, maintain: $$ \text{exp1}i = (\text{exp1}{i-1} + 1) \cdot p_i $$ $$ \text{exp2}i = (\text{exp2}{i-1} + 2 \cdot \text{exp1}_{i-1} + 1) \cdot p_i $$ Then update the total expect ...

Posted on Mon, 05 Oct 2026 16:47:19 +0000 by manwhoeatsrats

Advanced Dynamic Programming: Interval, Tree, and Bitmask Strategies

Maximizing Collected Value from Falling Objects Given n falling objects on a 2D plane, each with a falling speed and initial height, starting from position (x0, 0). When directly aligned with an object, it can be collected instantly, yielding a value equal to its current height divided by 1000. The objective is to maximize the total collected v ...

Posted on Tue, 09 Jun 2026 16:25:06 +0000 by KEFE