题解:CF1245F Daniel and Spring Cleaning

· · 题解

观察到:

所以我们可以只求解 f(l, r)。显然设计数位 DP 状态 g(u, 0/1, 0/1) 表示考虑第 u 个二进制位且 a, b 是否填满。