Codeforces Round #111 (Div. 2) E. Buses and People 线段树

NoSuchKey