CodeForces 985 E Pencils and Boxes

NoSuchKey