codeforce 1430:F. Realistic Gameplay(思维 + 贪心 + dp)

NoSuchKey