#DFS序+二分+前缀和# Codeforces Round #381 (Div. 1) B. Alyona and a tree

NoSuchKey