Petya's Exams CodeForces - 978G (贪心)

NoSuchKey