D. An overnight dance in discotheque Codeforces Round #418 (Div. 2) (贪心)

NoSuchKey