Codeforces Round #487 (Div. 2) B. A Tide of Riverscape [贪心]

NoSuchKey