The first line contains the number of test cases t (1≤t≤100).
The first line of each test case contains the number of cars n and the length of the tunnel h (1≤n≤105, 1≤h≤109). The second line contains the car lengths a1,a2,…,an (1≤ai≤109). The third line contains n integers, where the i-th value is 1 if the light of the i-th car is on and 0 if it is off. The cars are given in the order they enter the tunnel.
The sum of n over all test cases does not exceed 106.