当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5806:NanoApe Loves Sequence Ⅱ

题目描述
NanoApe, the Retired Dog, has returned back to prepare for for the National Higher Education Entrance Examination!

In math class, NanoApe picked up sequences once again. He wrote down a sequence with $n$ numbers and a number $m$ on the paper.

Now he wants to know the number of continous subsequences of the sequence in such a manner that the $k$-th largest number in the subsequence is no less than $m$.

Note : The length of the subsequence must be no less than $k$.
输入解释
The first line of the input contains an integer $T$, denoting the number of test cases.

In each test case, the first line of the input contains three integers $n,m,k$.

The second line of the input contains $n$ integers $A_1, A_2, ..., A_n$, denoting the elements of the sequence.

$1 \le T \le 10,~2 \le n \le 200000,~1 \le k \le n/2,~1 \le m,A_i \le 10^9$
输出解释
For each test case, print a line with one integer, denoting the answer.
输入样例
1
7 4 2
4 2 7 7 6 5 1
输出样例
18
来自杭电HDUOJ的附加信息
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 BestCoder Round #86

源链接: HDU-5806

最后修改于 2020-10-25T23:25:48+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 262144/131072K(Java/Others)