In mathematics you don't understand things, you just get used to them.

标签 dp 下的文章

题都是好题,会的没几道。「codeforces - 367E」Sereja and Intervals:注意到 $l_x < l_y$ 且 $r_x < r_y$,以及 $n \le...

link。平时基本打不到 ex,这个 ex 还是比较 ez 的,但也有些需要注意的地方。考虑 dp 规划前缀,设 $f[i][0/1]$ 表示前缀 $[1, i]$ 否是选 $i$ 的方案数,这...