Codeforces 1187 D. Subarray Sorting —— 线段树,贪心

NoSuchKey