Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. 

There are N students living in the dormitory of Berland State University. Each of them sometimes wants to use the kitchen, so the head of the dormitory came up with a timetable for kitchen's usage in order to avoid the conflicts:

The first student starts to use the kitchen at the time 0 and should finish the cooking not later than at the time A_{1}.
The second student starts to use the kitchen at the time A_{1} and should finish the cooking not later than at the time A_{2}.
And so on.
The N-th student starts to use the kitchen at the time A_{N-1} and should finish the cooking not later than at the time A_{N}

The holidays in Berland are approaching, so today each of these N students wants to cook some pancakes. The i-th student needs B_{i} units of time to cook.

The students have understood that probably not all of them will be able to cook everything they want. How many students will be able to cook without violating the schedule?

------ Input Format ------ 

The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. \
Each test case contains 3 lines of input
- The first line of each test case contains a single integer N denoting the number of students.
- The second line contains N space-separated integers A1, A2, ..., AN denoting the moments of time by when the corresponding student should finish cooking. 
- The third line contains N space-separated integers B1, B2, ..., BN denoting the time required for each of the students to cook.

------ Output Format ------ 

For each test case, output a single line containing the number of students that will be able to finish the cooking.

------ Constraints ------ 

1 ≤ T ≤ 10 \
1 ≤ N ≤ 104 \
0 A1 A2 AN 109 \
1 ≤ Bi ≤ 109

----- Sample Input 1 ------ 
2
3
1 10 15
1 10 3
3
10 20 30
15 5 20
----- Sample Output 1 ------ 
2
1
----- explanation 1 ------ 
Example case 1. The first student has 1 unit of time - the moment 0. It will be enough for her to cook. The second student has 9 units of time, but wants to cook for 10 units of time, and won't fit in time. The third student has 5 units of time and will fit in time, because needs to cook only for 3 units of time.
Example case 2. Each of students has 10 units of time, but only the second one will be able to fit in time.

Difficulty: EASY

Starter code:

Solutions:
for x in range(int(input())):
	studentsCount = int(input())
	successfulStudentsCount = 0
	allocatedTimes = [int(y) for y in input().split(' ')]
	requiredTimes = [int(z) for z in input().split(' ')]
	for student in range(studentsCount):
		if student == 0:
			if requiredTimes[student] <= allocatedTimes[student]:
				successfulStudentsCount += 1
		elif requiredTimes[student] <= abs(allocatedTimes[student - 1] - allocatedTimes[student]):
			successfulStudentsCount += 1
	print(successfulStudentsCount)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	c = 0
	if a[0] - 0 >= b[0]:
		c += 1
	for i in range(1, n):
		if a[i] - a[i - 1] >= b[i]:
			c += 1
	print(c)


for _ in range(int(input())):
	n = int(input())
	pts = ('0 ' + input()).split()
	times = input().split()
	res = 0
	for _ in range(1, len(pts)):
		if int(pts[_]) - int(pts[_ - 1]) >= int(times[_ - 1]):
			res += 1
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	time = list(map(int, input().split()))
	unit = list(map(int, input().split()))
	c = 0
	if time[0] >= unit[0]:
		c = c + 1
	for i in range(1, n):
		if time[i] - time[i - 1] >= unit[i]:
			c = c + 1
	print(c)


for i in range(int(input())):
	n1 = int(input())
	a1 = list(map(int, input().split()))
	b1 = list(map(int, input().split()))
	c = 0
	A = a1[0]
	for x in range(0, n1):
		if x > 0:
			A = a1[x] - a1[x - 1]
		if A >= b1[x]:
			c += 1
	print(c)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = [0] + a
	count = 0
	b = list(map(int, input().split()))
	for i in range(n):
		x = a[i + 1] - a[i]
		if x >= b[i]:
			count += 1
	print(count)


t = int(input())
for z in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	time = A[0]
	c = 0
	for q in range(0, n):
		if q > 0:
			time = A[q] - A[q - 1]
		if time >= B[q]:
			c += 1
	print(c)


test_cases = int(input())
for i in range(test_cases):
	n = int(input())
	time_alot = list(map(int, input().split()))
	time_act = list(map(int, input().split()))
	possible = 0
	for space in range(n):
		time = 0
		if space == 0:
			time = time_alot[space]
		else:
			time = time_alot[space] - time_alot[space - 1]
		if time >= time_act[space]:
			possible += 1
	print(possible)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	b = list(map(int, input().split()))
	l.insert(0, 0)
	c = 0
	for i in range(1, n + 1):
		t = l[i] - l[i - 1]
		if t >= b[i - 1]:
			c += 1
	print(c)


for i in range(int(input())):
	t = int(input())
	l = list(map(int, input().split()))
	m = list(map(int, input().split()))
	l.insert(0, 0)
	c = 0
	for i in range(t):
		p = l[i + 1] - l[i]
		if p >= m[i]:
			c += 1
		else:
			c += 0
	print(c)


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	c = 0
	for i in range(N):
		if i == 0:
			if A[i] >= B[i]:
				c += 1
		elif B[i] <= A[i] - A[i - 1]:
			c += 1
	print(c)


T = int(input())
for i in range(T):
	count = 0
	N = int(input())
	A = input().split()
	B = input().split()
	A = list(map(lambda x: int(x), A))
	B = list(map(lambda x: int(x), B))
	prev = 0
	for x in range(0, N):
		next_term = A[x]
		difference = next_term - prev
		if difference > B[x] or difference == B[x]:
			count += 1
		prev = next_term
	print(count)


T = int(input())
for i in range(T):
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	b = list(map(int, input().strip().split()))[:n]
	c = 0
	for j in range(n):
		if j == 0:
			if a[j] >= b[j]:
				c = c + 1
		elif b[j] <= a[j] - a[j - 1]:
			c = c + 1
	print(c)


for i in range(int(input())):
	t = 0
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	for i in range(n):
		if i == 0 and a[i] >= b[i]:
			t += 1
			continue
		if i > 0 and b[i] <= a[i] - a[i - 1]:
			t += 1
	print(t)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	c = 0
	at = a[0]
	for x in range(0, n):
		if x > 0:
			at = a[x] - a[x - 1]
		if at >= b[x]:
			c += 1
	print(c)


t = int(input())
while t > 0:
	N = int(input())
	horario = list(map(int, input().split()))
	tiempoest = list(map(int, input().split()))
	i = 0
	cont = 0
	while i < N:
		if i > 0:
			tiempodisponible = horario[i] - horario[i - 1]
		else:
			tiempodisponible = horario[i]
		if tiempoest[i] <= tiempodisponible:
			cont += 1
		i += 1
	print(cont)
	t -= 1


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = list(map(int, input().split()))
	c = 0
	at = l[0]
	for x in range(0, n):
		if x > 0:
			at = l[x] - l[x - 1]
		if at >= m[x]:
			c += 1
	print(c)


T = int(input())
for tc in range(T):
	Stu = int(input())
	A = list(map(int, input().split(' ')))
	B = list(map(int, input().split(' ')))
	count = 0
	X = 0
	for i in range(Stu):
		if A[i] - X >= B[i]:
			count += 1
		X = A[i]
	print(count)


t = int(input())
for i in range(t):
	N = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	c = 0
	x = 0
	if B[x] <= A[x]:
		c += 1
	for i in range(1, N):
		time = A[i] - A[i - 1]
		if time >= B[i]:
			c += 1
	print(c)


def solve(N, A, B):
	timeGot = []
	previous = 0
	for i in A:
		timeGot.append(i - previous)
		previous = i
	count = 0
	for i in range(N):
		if timeGot[i] >= B[i]:
			count += 1
	print(count)
T = int(input())
for x in range(T):
	N = int(input())
	A = list(map(int, input().split(' ')))
	B = list(map(int, input().split(' ')))
	solve(N, A, B)


T = int(input())
for i in range(0, T):
	N = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	count = 0
	for a in range(0, N):
		if a == 0:
			if A[0] >= B[0]:
				count += 1
			else:
				continue
		else:
			k = A[a] - A[a - 1]
			if k >= B[a]:
				count += 1
			else:
				continue
	print(count)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	z = a.copy()
	c = 0
	for i in range(n):
		if i > 0:
			a[i] -= z[i - 1]
		if b[i] <= a[i]:
			c += 1
	print(c)


for i in range(int(input())):
	cnt = 0
	n = int(input())
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	for j in range(n):
		k = l1[j]
		if j > 0:
			l1[j] = l1[j] - l1[j - 1]
		if l1[j] - l2[j] >= 0:
			cnt = cnt + 1
		l1[j] = k
	print(cnt)


t = int(input())
for _ in range(t):
	x = int(input())
	y = list(map(int, input().split()[:x]))
	z = list(map(int, input().split()[:x]))
	c = 0
	for i in range(x):
		if i == 0 and y[i] >= z[i]:
			c += 1
		elif y[i] - y[i - 1] >= z[i]:
			c += 1
	print(c)


tc = int(input())
for _ in range(tc):
	count = 0
	n = int(input())
	t = list(map(int, input().split()))
	u = list(map(int, input().split()))
	if u[0] <= t[0]:
		count = count + 1
	else:
		count = count
	for i in range(1, len(t)):
		s = t[i] - t[i - 1]
		if s >= u[i]:
			count = count + 1
		else:
			count = count
	print(count)


t = int(input())
for _ in range(t):
	a = int(input())
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	c = 0
	x = l1[0]
	for i in range(a):
		if i > 0:
			x = l1[i] - l1[i - 1]
		if x >= l2[i]:
			c += 1
	print(c)


for i in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	count = 0
	ls1 = l1[0]
	for i in range(0, n):
		if i > 0:
			ls1 = l1[i] - l1[i - 1]
		if ls1 >= l2[i]:
			count += 1
	print(count)


def student():
	c = 0
	if l[0] >= p[0]:
		c = c + 1
	for i in range(1, len(l)):
		if l[i] - l[i - 1] >= p[i]:
			c = c + 1
	return c
n = int(input())
for i in range(n):
	s = int(input())
	l = list(map(int, input().split()))
	p = list(map(int, input().split()))
	print(student())


t = int(input())
for _ in range(t):
	N = int(input())
	tgiven = list(map(int, input().split()))
	trequired = list(map(int, input().split()))
	count = 0
	a_time = tgiven[0]
	for a in range(0, N):
		if a > 0:
			a_time = tgiven[a] - tgiven[a - 1]
		if a_time >= trequired[a]:
			count = count + 1
	print(count)


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	c = 0
	for i in range(n):
		if i == 0:
			if A[i] >= B[i]:
				c += 1
		else:
			arr = A[i] - A[i - 1]
			if arr >= B[i]:
				c += 1
	print(c)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	count = 0
	c = []
	c.append(a[0])
	for j in range(1, n):
		c.append(a[j] - a[j - 1])
	for k in range(n):
		if c[k] >= b[k]:
			count += 1
	print(count)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	result = 0
	prev = 0
	for i in range(n):
		if a[i] - prev >= b[i]:
			result = result + 1
		prev = a[i]
	print(result)


for i in range(int(input())):
	num = int(input())
	x = [0] + [int(x) for x in input().split()]
	y = [int(x) for x in input().split()]
	a = 0
	for j in range(1, num + 1):
		if x[j] - x[j - 1] >= y[j - 1]:
			a += 1
	print(a)


import copy
for i in range(0, int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	final_l = copy.copy(l)
	for i in range(1, n):
		final_l[i] = final_l[i] - l[i - 1]
	time = list(map(int, input().split()))
	c = 0
	for i in range(0, n):
		if final_l[i] >= time[i]:
			c += 1
	print(c)


for j in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	a1 = []
	count = 0
	for i in range(n):
		if i == 0:
			if a[i] >= b[i]:
				count = count + 1
		elif a[i] - a[i - 1] >= b[i]:
			count = count + 1
	print(count)


T = int(input())
for _ in range(T):
	N = int(input())
	lstA = [int(i) for i in input().split()][0:N]
	lstB = [int(i) for i in input().split()][0:N]
	lstA.insert(0, 0)
	count = 0
	for i in range(1, len(lstA)):
		if lstA[i] - lstA[i - 1] >= lstB[i - 1]:
			count += 1
	print(count)


for _ in range(int(input())):
	n = int(input())
	td = [int(i) for i in input().split()]
	ts = [int(i) for i in input().split()]
	cn = 0
	for i in range(n):
		if i == 0:
			if ts[i] <= td[i]:
				cn += 1
		elif ts[i] <= td[i] - td[i - 1]:
			cn += 1
	print(cn)


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	a.insert(0, 0)
	c = [a[i + 1] - a[i] for i in range(n)]
	count = 0
	for i in range(len(c)):
		if c[i] >= b[i]:
			count += 1
	print(count)


for i in range(int(input())):
	n = int(input())
	ttf = list(map(int, input().split()))
	tr = list(map(int, input().split()))
	a = 0
	if ttf[0] >= tr[0]:
		a += 1
	for i in range(len(ttf)):
		if i > 0:
			if ttf[i] - ttf[i - 1] >= tr[i]:
				a += 1
	print(a)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	c = 0
	d = a[0]
	for x in range(0, n):
		if x > 0:
			d = a[x] - a[x - 1]
		if d >= b[x]:
			c += 1
	print(c)


for _ in range(int(input())):
	l = int(input())
	r = list(map(int, input().split()))
	n = list(map(int, input().split()))
	c = 0
	f = 0
	for x in range(l):
		if r[x] - f >= n[x]:
			c += 1
		f = r[x]
	print(c)


for i in range(int(input())):
	n = int(input())
	m = list(map(int, input().split()))
	p = list(map(int, input().split()))
	c = 0
	mt = m[0]
	for x in range(0, n):
		if x > 0:
			mt = m[x] - m[x - 1]
		if mt >= p[x]:
			c += 1
	print(c)


t = int(input())
for i in range(t):
	N = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	count = 0
	subTime = 0
	for i in range(N):
		if A[i] - subTime >= B[i]:
			count += 1
		subTime = A[i]
	print(count)


t = int(input())
for i in range(t):
	n = int(input())
	input_list = input().split()
	a = [int(x) for x in input_list]
	input_list = input().split()
	b = [int(x) for x in input_list]
	count = 0
	for i in range(n):
		if i == 0:
			if a[i] >= b[i]:
				count = count + 1
		elif a[i] - a[i - 1] >= b[i]:
			count = count + 1
	print(count)


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	d = list(map(int, input().split()))
	e = 0
	at = c[0]
	for j in range(0, b):
		if j > 0:
			at = c[j] - c[j - 1]
		if at >= d[j]:
			e += 1
	print(e)


for t in range(int(input())):
	N = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	c = 0
	at = a[0]
	for x in range(N):
		if x > 0:
			at = a[x] - a[x - 1]
		if at >= b[x]:
			c += 1
	print(c)


for i in range(int(input())):
	k = int(input())
	a = list(map(int, input().split(' ', k)))
	b = list(map(int, input().split(' ', k)))
	count = 0
	if a[0] - 0 >= b[0]:
		count += 1
	for j in range(1, k):
		if a[j] - a[j - 1] >= b[j]:
			count += 1
	print(count)


for i in range(int(input())):
	n = int(input())
	numbers1 = [int(num) for num in input().split(' ', n - 1)]
	numbers2 = [int(num) for num in input().split(' ', n - 1)]
	value = 0
	for o in range(n):
		if o == 0:
			if numbers1[o] >= numbers2[o]:
				value = value + 1
		if numbers2[o] <= numbers1[o] - numbers1[o - 1] and o != 0:
			value = value + 1
	print(value)


for t in range(int(input())):
	n = int(input())
	A = [int(i) for i in input().split()]
	B = [int(i) for i in input().split()]
	C = []
	C.append(A[0])
	for i in range(1, n):
		C.append(A[i] - A[i - 1])
	count = 0
	for i in range(n):
		if B[i] <= C[i]:
			count += 1
	print(count)


def check(n, L1, L2):
	ans = 0
	if L1[0] >= L2[0]:
		ans += 1
	for i in range(1, n):
		if L2[i] <= L1[i] - L1[i - 1]:
			ans += 1
	return ans
for i in range(int(input())):
	n = int(input())
	L1 = list(map(int, input().split()))
	L2 = list(map(int, input().split()))
	print(check(n, L1, L2))


t = int(input())
for i in range(t):
	c = 0
	n = int(input())
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	if A[0] >= B[0]:
		c += 1
	for j in range(0, n):
		if A[j] - A[j - 1] >= B[j]:
			c += 1
	print(c)


for i in range(int(input())):
	N = int(input())
	A = [int(x) for x in input().split()]
	B = [int(x) for x in input().split()]
	count = 0
	for j in range(len(A)):
		if B[j] <= A[j] - (0 if j == 0 else A[j - 1]):
			count += 1
	print(count)


T = int(input())
for i in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	count = 0
	h = a[0]
	for d in range(0, n):
		if d > 0:
			h = a[d] - a[d - 1]
		if h >= b[d]:
			count += 1
	print(count)


for inputs in range(int(input())):
	ans = 0
	N = int(input())
	A = [0] + input().split()
	B = input().split()
	for i in range(N):
		if int(B[i]) <= int(A[i + 1]) - int(A[i]):
			ans += 1
	print(ans)


kitchen = []
kitchen_time = {}
T = int(input())
for _ in range(T):
	s = int(input())
	time_allotted = input().split()
	time_required = input().split()
	kitchen_time = {'student_number': s, 'time_allotted': time_allotted, 'time_required': time_required}
	kitchen.append(kitchen_time)
for i in range(T):
	time_elapsed = 0
	can_cook = 0
	kitchen_time = kitchen[i]
	for j in range(int(kitchen[i]['student_number'])):
		time_with_student = int(kitchen[i]['time_allotted'][j]) - time_elapsed
		if time_with_student >= int(kitchen[i]['time_required'][j]):
			can_cook += 1
		time_elapsed = int(kitchen[i]['time_allotted'][j])
	print(can_cook)


def kitchen_timetable():
	n = int(input())
	available_time = list(map(int, input().split()))
	required_time = list(map(int, input().split()))
	count = 0
	if available_time[0] >= required_time[0]:
		count += 1
	for i in range(1, n):
		time_left = available_time[i] - available_time[i - 1]
		if time_left >= required_time[i]:
			count += 1
	print(count)
t = int(input())
while t:
	kitchen_timetable()
	t -= 1