Skip to content

CF1051E

Step 1

We have the dp: $\(f[i] = \sum_{[j+1, i]\text{valid}}{f[j]}\)$ note that the range where