Codeforces976E Well played! 【贪心】

NoSuchKey