Codeforces Round #302 (Div. 2) C Writing Code(dp)

NoSuchKey