D. Almost Difference Educational Codeforces Round 34 (Rated for Div. 2)

NoSuchKey