Codeforces Round 573 (Div. 1&2)

挺难的,但没有 DP 好评() ...