Codeforces Round #196 (Div. 2) D.Book of Evil(树形dp)

NoSuchKey