Codeforces Round #130 (Div. 2) E 树上倍增 + 两次二分

NoSuchKey