n1 = list(map(int,input().split(" ")))
py = list(map(int,input().split(" ")))
steps = list(map(int,input().split(" ")))
highst = list(map(int,input().split(" ")))
n = n1[0]
m = n1[1]
h = n1[2] + max(highst)
ans = []
a=0
for num in range(len(py)):
hight = py[num] + highst[steps[num]-1]
ans.append(hight)
for i in ans:
if i < h:
a +=1
print(a)

京公网安备 11010502036488号