2019牛客多校第七场E Find the median 权值线段树+离散化
Find the median 题目链接: https://ac.nowcoder.com/acm/contest/887/E 题目描述 Let median of some array be the number which would stand in the middle of this array if it was sorted beforehand. If the array has even length let median be smallest of of two middle elements. For example, median of the array \([10,3,2,3,2]\) is 3 (i.e. \([2,2,\underline{3},3,10]\) ). Median of the array [1,5,8,1] is 1 (i.e. \([1,\underline{1},5,8]\) ). At first, you're given an empty sequence. There are N operations. The i-th operation contains two integers \(L_i\) and \(R_i\) . This means that adding \(R_i-L_i+1\) integers