Educational Codeforces Round 50: B Diagonal Walking v.2

NoSuchKey