Codeforces 1186 F. Vus the Cossack and a Graph —— 线段树,贪心

NoSuchKey