摘要:
题目描述: 定义一个长度为奇数的区间的值为其所包含的的元素的中位数。 现给出n个数,求将所有长度为奇数的区间的值排序后,第K大的值为多少。 样例解释: [l,r]表示区间的值 [1]:3 [2]:1 [3]:2 [4]:4 [1,3]:2 [2,4]:2 第三大是2 输入: 第一行两个数n和k(1< 阅读全文
摘要:
Description One-dimensional country has n cities, the i-th of which is located at the point xi and has population pi, and all xi, as well as all pi, a 阅读全文