SOLVE

LATER

Xsquare And Coin Collection

/

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 **H _{i}** equal to the number of coins on that stack ( considering all the coins are identical and each coin has a height of

In one move, Xsquare can select any number of consecutive stacks of coins such that the height of each selected stack of coins **H _{i} ≤ 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 ?

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 **H _{i}** on each stack .

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

**1 ≤ T ≤ 10 ^{5}**

**1 ≤ N ≤ 10 ^{5}**

**1 ≤ K ≤ 10 ^{9}**

**1 ≤ H _{i} ≤ 10^{9}**

sum of **N** over all the test case will not exceed **10 ^{6}**.

Explanation

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 .

Time Limit:
3.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Initializing Code Editor...