|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||15||4||4||30.769%|
Peter has decided to take a journey. He is traveling in a train right now. The train has n cars, the length of the i-th car is ai meters. Let us ignore distance between the cars.
Peter noticed that some cars have the light on, while some have the light off. The train is approaching a tunnel that has length of h meters. Peter doesn't want there was a moment when only cars with the light off were in the tunnel. Peter calls a moment dark if all cars that have some non-zero length part in a tunnel have the light off. To avoid dark moments, Peter wants to turn the light on in some cars.
Help Peter to turn the light on in the minimal number of cars, that there were no dark moment while the train passes the tunnel.
Input contains several tests. The first line contains one integer t (1 ≤ t ≤ 100) — the number of tests. The tests follow.
Each test has the following structure. The first line of the test contains two integers: n and h (1 ≤ n ≤ 105, 1 ≤ h ≤ 109) — the number of cars and the length of the tunnel. The second line contains n integers ai (1 ≤ ai ≤ 109) — the lengths of the cars. The third line contains n integers, the i-th of them is 1 if the i-th car initially has the light on, or 0 if it has the light off. Cars are described in order they would enter the tunnel.
The sum of values of n for all tests doesn't exceed 106.
For each test case output one integer — the minimal number of cars that Peter must turn the light on so that there were no dark moment.
2 7 10 5 3 4 5 9 9 9 1 0 0 0 1 0 0 5 2 1 2 3 1 1 1 1 0 1 1