Codeforces Round #221 (Div. 1) D Tree and Queries(树上启发式合并 + 树状数组)

NoSuchKey