P12977 [HackerEarth] xsquare and coin collection 2
普及
题目描述

Xsquare loves to play with the coins very much. Today , he has N stacks of coins . Each stack of coins has some non zero height Hi equal to the number of coins on that stack ( considering all the coins are identical and each coin has a height of 1 unit ) .

In one move, Xsquare can select any number of consecutive stacks of coins such that the height of each selected stack of coins Hi ≤ K . Once such a sequence of stacks is chosen , Xsquare can collect any number of coins from the chosen sequence of stacks .

Xsquare wonders what is the maximum number of coins that he can collect this way ?

INPUT
First line of input contains a single integer T denoting the number of test cases . First line of each test case contains two space separated integers N and K where N being the number of stacks of coins. Second line of each test case contains N space separated integers denoting the number of coins Hi on each stack .

OUTPUT
For each test case , Print the maximum number of coins Xsquare can collect following the above gaming strategy.

CONSTRAINTS
1 ≤ T ≤ 10^5

1 ≤ N ≤ 10^5

1 ≤ K ≤ 10^9

1 ≤ Hi ≤ 10^9

Note :
sum of N over all the test case will not exceed 10^6.

SAMPLE INPUT
2
8 1
3 2 2 3 1 1 1 3
8 2
3 2 2 3 1 1 1 3

SAMPLE OUTPUT
3
4Explanation

Test 1 :
N = 8 , K = 1
3 2 2 3 1 1 1 3
We can collect coins from stacks numbered 5 , 6 and 7 .

Test 2 :
N = 8 , K = 2
3 2 2 3 1 1 1 3
We can collect coins from stacks numbered 2 and 3 .

输入格式

见题面

输出格式

见题面

样例输入
2 8 1 3 2 2 3 1 1 1 3 8 2 3 2 2 3 1 1 1 3 SAMPLE
样例输出
3 4