CodeForces 487E Tourists(圆方树+线段树+树链剖分)

NoSuchKey