• Source
    1. # your code goes here
    2. test=int(input())
    3. def solve():
    4. lis=[int(i)for i in input().split()]
    5. arr=[int(i)for i in input().split()]
    6. if arr[0]<lis[1]:
    7. present="first"
    8. else:
    9. present="second"
    10. count=1
    11. for i in range(1,len(arr)):
    12. if arr[i]<lis[1] and present =="second":
    13. count+=1
    14. present="first"
    15. # print(count,lis[i])
    16. if arr[i]>=lis[1] and present=="first":
    17. count +=1
    18. present="second"
    19.  
    20. print(count)
    21. while test:
    22. solve()
    23. test-=1
    24.  
    25.