Codeforces 1307 C. Cow and Message(DP)

NoSuchKey