[Codeforces Round #604 (Div. 2)]D. Beautiful Sequence(贪心)

NoSuchKey