package main
import (
"os"
"strconv"
)
type Component struct {
s int64
rR int64
rL int64
w int
}
func max(a, b int64) int64 {
if a > b {
return a
}
return b
}
func main() {
buf, _ := os.ReadFile("/dev/stdin")
pos := 0
nextInt := func() int {
for pos < len(buf) && buf[pos] <= ' ' {
pos++
}
if pos >= len(buf) {
return 0
}
res := 0
for pos < len(buf) && buf[pos] > ' ' {
res = res*10 + int(buf[pos]-'0')
pos++
}
return res
}
nextInt64 := func() int64 {
for pos < len(buf) && buf[pos] <= ' ' {
pos++
}
if pos >= len(buf) {
return 0
}
res := int64(0)
for pos < len(buf) && buf[pos] > ' ' {
res = res*10 + int64(buf[pos]-'0')
pos++
}
return res
}
t := nextInt()
if t == 0 {
return
}
out := make([]byte, 0, 1024*1024*10)
for tc := 0; tc < t; tc++ {
n := nextInt()
x := nextInt()
_ = x
stack := make([]Component, 0, n)
for i := 0; i < n; i++ {
val := nextInt64()
C := Component{s: val, rR: val, rL: val, w: 1}
for len(stack) > 0 {
top := stack[len(stack)-1]
if top.s < C.rL {
stack = stack[:len(stack)-1]
C.rR = max(C.rR, top.rR-C.s)
C.rL = max(top.rL, C.rL-top.s)
C.s = top.s + C.s
} else if C.s >= top.rR {
stack = stack[:len(stack)-1]
C.w += top.w
C.rR = max(C.rR, top.rR-C.s)
C.rL = max(top.rL, C.rL-top.s)
C.s = top.s + C.s
} else {
break
}
}
stack = append(stack, C)
out = strconv.AppendInt(out, int64(stack[0].w), 10)
out = append(out, ' ')
}
if len(out) > 0 {
out[len(out)-1] = '\n'
}
}
os.Stdout.Write(out)
}