Codeforces Contest 1110 problem D Jongmah——三种状态的dp

NoSuchKey