Problem:
 Score : 200 points    Problem Statement There are N pieces of source code. The characteristics of the i -th code is represented by M integers A_{i1}, A_{i2}, ..., A_{iM} .  Additionally, you are given integers B_1, B_2, ..., B_M and C .  The i -th code correctly solves this problem if and only if A_{i1} B_1 + A_{i2} B_2 + ... + A_{iM} B_M + C > 0 .  Among the N codes, find the number of codes that correctly solve this problem.      Constraints  All values in input are integers.  1 \leq N, M \leq 20  -100 \leq A_{ij} \leq 100  -100 \leq B_i \leq 100  -100 \leq C \leq 100         Input Input is given from Standard Input in the following format:  N  M  C  B_1  B_2  ...  B_M  A_{11}  A_{12}  ...  A_{1M}  A_{21}  A_{22}  ...  A_{2M}  \vdots  A_{N1}  A_{N2}  ...  A_{NM}       Output Print the number of codes among the given N codes that correctly solve this problem.        Sample Input 1 2 3 -10
1 2 3
3 2 1
1 2 2      Sample Output 1 1  Only the second code correctly solves this problem, as follows:   Since 3 \times 1 + 2 \times 2 + 1 \times 3 + (-10) = 0 \leq 0 , the first code does not solve this problem.  1 \times 1 + 2 \times 2 + 2 \times 3 + (-10) = 1 > 0 , the second code solves this problem.        Sample Input 2 5 2 -4
-2 5
100 41
100 40
-3 0
-6 -2
18 -13      Sample Output 2 2       Sample Input 3 3 3 0
100 -100 0
0 100 100
100 100 100
-100 100 100      Sample Output 3 0  All of them are Wrong Answer . Except yours.

Solution (Python):
n,m,c=map(int,input().split())
bli = [int(i) for i in input().split()]
ans=0
for i in range(n):
	a = [int(j) for j in input().split()]
	sum=0
	for k in range(m):
		sum += a[k]*bli[k]
	if sum + c > 0:
		ans += 1

print(ans)

Solution (Python):
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
d = 0
for i in range(n):
    ans = 0
    a = list(map(int, input().split()))
    for j in range(m):
        ans += a[j]*b[j]
    ans += c
    if ans > 0:
        d+=1
print(d)

Solution (Python):
n,m,c=map(int,input().split())
bs=list(map(int,input().split()))
ans=0
for i in range(n):
    as_=list(map(int,input().split()))
    if sum([a*b for a,b in zip(as_,bs)])+c>0:
        ans+=1
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a_list = []
for i in range(n):
    a = list(map(int, input().split()))
    a_list.append(a)

count = 0
for i in range(n):
    sum = 0
    for j in range(m):
        sum += a_list[i][j] * b[j]
    sum += c
    if sum > 0:
        count += 1

print(count)

Solution (Python):
n,m,c = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(n):
    A = list(map(int,input().split()))
    s = c
    for j in range(m):
        s += A[j]*B[j]
    if s > 0:
        ans += 1
print(ans)

Solution (Python):
def is_correct(a, b, c, i):
    assert len(a) == N
    assert len(a[i]) == M
    return (sum([a[i][j] * b[j] for j in range(M)]) + c) > 0


if __name__ == "__main__":

    N, M, C = [int(x) for x in input().split(" ")]
    B = [int(x) for x in input().split(" ")]
    A = []
    for _ in range(N):
        A.append([int(x) for x in input().split(" ")])
    count = 0
    for i in range(N):
        if is_correct(A, B, C, i):
            count += 1

    print(count)

Solution (Python):
N, M, C = map(int, input().split())

B = list(map(int, input().split()))

count = 0
for _ in range(N):
    if sum([ai * bi for ai, bi in zip(map(int, input().split()), B)]) > -C:
        count += 1
        
print(count)

Solution (Python):
N, M, C = map(int,input().split())
B = list(map(int,input().split()))
A = [list(map(int,input().split())) for i in range(N)]

ans = 0

for i in range(N):
  abc = 0
  for j in range(M):
    abc += A[i][j] * B[j]
  else:
    abc += C
    
  if abc > 0:
    ans += 1
    
print(ans)

Solution (Python):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
answer = 0
for i in range(N):
    sum=0
    for j in range(M):
        sum = sum + A[i][j]*B[j]
    if sum + C > 0:
        answer = answer +1

print(answer)

Solution (Python):
n,m,c=map(int,input().split())
b=[int(i) for i in input().split()]
ans=0
for i in range(n):
    a=[int(i) for i in input().split()]
    su=[a[i]*b[i] for i in range(m)]
    if sum(su)+c>0:
        ans+=1
print(ans)

Solution (Python):
n,m,c = map(int, input().split())
bl = list(map(int, input().split()))
cnt = 0

for i in range(n):
    r = c
    al = list(map(int, input().split()))
    for j in range(m):
        r+= bl[j]*al[j]
    if r>0:
        cnt+=1
print(cnt)

Solution (Python):
import numpy as np
N, M, C = map(int, input().split())
b_inputs = np.array(list(map(int, input().split())))

a_inputs = [np.array(list(map(int, input().split()))) for _ in range(N)]

ans = 0
for i in range(N):
    if sum(a_inputs[i] * b_inputs) + C > 0:
        ans += 1

print(ans)

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
z=0
for _ in range(n):
    a=list(map(int,input().split()))
    s=0
    for j in range(m):
        s+=b[j]*a[j]
    if s+c>0:
        z+=1
print(z)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
ans = 0
for i in range(n):
    res = c
    for j in range(m):
        res += b[j]*a[i][j]
    if res > 0: ans += 1
print(ans)

Solution (Python):
nmc = list(map(int, input().split()))
b = list(map(int, input().split()))
a_st = [input().split() for i in range(nmc[0])]
a = [[int(item) for item in row] for row in a_st]
count = 0

for i in a:
    s = 0
    for index, value in enumerate(i):
        s += value * b[index]
    if s + nmc[2] > 0:
        count += 1
print(count)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
res = 0
for i in range(n):
	a = list(map(int, input().split()))
	cnt = 0
	for j in range(m):
		cnt += a[j]*b[j]
	cnt += c
	if cnt > 0:
		res += 1
print (res)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
ans = 0
for i in range(n):
    s = 0
    a = list(map(int, input().split()))
    for j in range(m):
        s += a[j] * b[j]
    if s > -c:
        ans += 1
print(ans)

Solution (Python):
import numpy as np

N, M, C = map(int, input().split())
B = np.array([int(i) for i in input().split()])
cnt = 0
for i in range(N):
    A = np.array([int(i) for i in input().split()])
    if np.dot(A, B) + C > 0:
        cnt += 1
print(cnt)

Solution (Python):
import numpy as np
n, m, c = map(int, input().split())
b = np.array(list(map(int, input().split())))
a_l = [ np.array(list(map(int, input().split()))) for _ in range(n) ]

r = 0
for a in a_l:
    if np.dot(a, b) + c > 0:
      r += 1
print(r)

Solution (Python):
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [list(map(int,input().split())) for _ in range(N)]
ans = 0
cnt = C
for i in range(N):
    for j in range(M):
        cnt += B[j]*A[i][j]
    if cnt > 0:
        ans += 1
    cnt = C
print(ans)

Solution (Python):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [input().split() for l in range(N)]

ans = 0
for i in range(N):
	sum = 0
	for j in range(M):
		sum += int(A[i][j])*B[j]
	if sum + C > 0:
		ans += 1

print(ans)

Solution (Python):
(n, _, c), b, *a = [list(map(int, t.split())) for t in open(0)]
print(sum(-c<sum(j * k for j, k in zip(b, i)) for i in a))

Solution (Python):
(n, _, c),b, *a = [list(map(int, t.split())) for t in open(0)]
n = [1]*n
for h,i in enumerate(a):
    n[h] *= sum(j*k for j,k in zip(b, i)) + c > 0
print(sum(n))

Solution (Python):
n,m,c = map(int, input().split())
ans = 0
b = list(map(int,input().split()))
for i in range(n):
    t = c
    a = list(map(int,input().split()))
    for j in range(m):
        t+=a[j]*b[j]
    if t>0:
        ans+=1
print(ans)

Solution (Python):
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for i in range(N)]
count = 0

for i in range(N):
    sum = 0
    for j in range(M):
        sum += A[i][j] * B[j]
    sum += C
    if(sum > 0):
        count += 1

print(count)

Solution (Python):
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = []
for _ in range(N):
    A += [list(map(int, input().split()))]

num = 0
for i in range(N):
    cost = sum([a * b for (a, b) in zip(A[i], B)]) + C
    if cost > 0:
        num += 1
print(num)

Solution (Python):
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
ans = 0
for i in range(n):
    sm = 0
    for j in range(m):
        sm += a[i][j]*b[j]
    if(sm + c > 0):
        ans += 1
print(ans)

Solution (Python):
n,m,c =map(int,input().split())

b =list(map(int,input().split()))

ans=0
for _ in range(n):
    total =c

    a = list(map(int,input().split()))

    for i in range(m):
        total += a[i]*b[i]

    if total>0:
        ans+=1
    
print(ans)

Solution (Python):
N,M,C = map(int,input().split())
B=[0]*M
tmp = input().split()
for m in range(M):
    B[m] = int(tmp[m])

cnt = 0
for n in range(N):
    tmp = input().split()
    point = 0
    for m in range(M):
        point += B[m]*int(tmp[m])
    point += C
    if point > 0:
        cnt += 1

print(cnt)

Solution (Python):
n,m,c=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int, input().split()))for i in range(n)]
cnt = 0
for i in range(n):
  total = 0
  for j in range(m):
    total += B[j] * A[i][j]
  total += c
  if total > 0:
    cnt += 1
print(cnt)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
ans = 0
for i in range(n) :
	a = list(map(int, input().split()))
	if sum([x * y for (x, y) in zip(a, b)]) + c > 0 :
		ans += 1
print(ans)

Solution (Python):
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for _ in range(N)]
result = [[A[i][j]*B[j] for j in range(M)] for i in range(N)]
result = [1 for i in result if sum(i)+C > 0]
print(len(result))

Solution (Python):
il = [int(k) for k in input().split()]
B = [int(k) for k in input().split()]
N = il[0]
M = il[1]
C = il[2]
result = 0

for i in range(N):
    A = [int(k) for k in input().split()]
    tmp_list = [x * y for (x, y) in zip(A, B)]
    sum_tmp_list = sum(tmp_list)
    if sum_tmp_list + C > 0:
        result += 1

print(result)

Solution (Python):
x = list(map(int, input().split()))
y = list(map(int, input().split()))
z = [list(map(int, input().split())) for i in range(x[0])]
count = 0
for i in z:
  tmp = x[2]
  for j in range(0, x[1]):
    tmp += i[j]*y[j]
  if tmp > 0:
    count += 1
print(count)

Solution (Python):
def li():
    return list(map(int, input().split()))


N, M, C = map(int, input().split())

B = li()

res = 0

for i in range(N):
    A = li()
    point = 0
    for j in range(M):
        point += A[j] * B[j]
    point += C

    if point > 0:
        res += 1

print(res)

Solution (Python):
def resolve():
    import numpy as np
    N, M, C = [int(i) for i in input().split()]
    B = [int(i) for i in input().split()]
    A = np.array([list(map(int, input().split())) for _ in range(N)])
    ans = 0
    for i in range(N):
        ans += 1 if sum(A[i] * B) + C > 0 else 0
    print(ans)


resolve()

Solution (Python):
def resolve():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))
    A = [list(map(int, input().split())) for i in range(N)]
    
    ans = 0
    for i in range(N):
        calc =[0]*M
        for j in range(M):
            calc[j] = A[i][j]*B[j]
        if sum(calc) + C > 0:
            ans += 1
    
    print(ans)
resolve()

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for i in range(n):
    result=0
    a=list(map(int,input().split()))
    for z in range(m):
        result+=b[z]*a[z]
    if (result+c)>0:
        count+=1
if count==0:
    print(0)
else:
    print(count)

Solution (Python):
import numpy as np
n,m,c=map(int, input().split())
b=np.array(list(map(int, input().split())))
count=0
for i in range(n):
  a=np.array(list(map(int, input().split())))
  if sum(a*b)+c>0:
    count+=1

print(count)

Solution (Python):
N, M, C = map(int, input().split(' '))
B = tuple(map(int, input().split(' ')))

count = 0
for _ in range(N):
    A = tuple(map(int, input().split(' ')))
    count += int(sum([a * b for a, b in zip(A, B)]) + C > 0)

print(count)

Solution (Python):
n, m, c = map(int, input().split())
b = tuple(map(int, input().split()))
ans = 0
for i in range(n):
    a = tuple(map(int, input().split()))
    x = 0
    for j in range(m):
        x += a[j] * b[j]
    if x + c > 0:
        ans += 1
print(ans)

Solution (Python):
import sys
import math
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N,M,C = LI()
B = LI()
A = [list(map(int,input().split())) for i in range(N)]

ans = 0
for i in range(len(A)):
    temp = 0
    for q in range(len(A[i])):
        temp += B[q]*A[i][q]
        if q == len(A[i]) - 1:
            temp += C
            
            if temp > 0:
                ans += 1

print(ans)

Solution (Python):
from sys import stdin

n, m, c = [int(x) for x in stdin.readline().strip().split()]

b_lst = [int(x) for x in stdin.readline().strip().split()]

cnt = 0
for _ in range(n):
  abc = sum([b_lst[i] * int(x) for i, x in enumerate(stdin.readline().strip().split())]) + c
  if(abc) > 0:
    cnt += 1
    
print(cnt)

Solution (Python):

import sys


def solve(N: int, M: int, C: int, B: "List[int]", A: "List[List[int]]"):

    ans = 0
    for sources in A:
        total = sum([a * b for a, b in zip(sources, B)]) + C
        if total > 0:
            ans += 1
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    M = int(next(tokens))  
    C = int(next(tokens))  
    B = [int(next(tokens)) for _ in range(M)]  
    A = [
        [int(next(tokens)) for _ in range(M)] for _ in range(N)
    ]  
    solve(N, M, C, B, A)


if __name__ == "__main__":
    main()

Solution (Python):
N,M,C = map(int,input().split())
B = [int(i) for i in input().split()]
A = []
for n in range(N):
    A.append([int(i) for i in input().split()])
cnt = 0
for a in A:
    temp = 0
    for i in range(M):
        temp += a[i] * B[i]
    temp += C
    cnt = cnt + 1 if temp > 0 else cnt
print(cnt)

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[input().split() for l in range(n)]
ans=0

for j in range(n):
    result=0
    for i in range(m):
        result+=int(a[j][i])*b[i]
    if result+c>0:
        ans+=1
print(ans)

Solution (Python):
def f12():
    N, M, C=map(int, input().split())
    B = [int(i) for i in input().split()]
    cnt=0
    for i in range(N):
        A=[int(j) for j in input().split()]
        if sum([A[j]*B[j] for j in range(M)])+C > 0:
            cnt += 1
    print(cnt)

def main():
    f12()

main()

Solution (Python):


n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0

for i in range(n):
    a = list(map(int,input().split()))
    s = 0

    for j in range(m):
        s += a[j] * b[j]

    if s+c > 0:
        ans += 1

print(ans)

Solution (Python):
n, m, c = map(int, input().split())
apple = []
orange = list(map(int, input().split()))
for _ in range(n):
    apple.append(list(map(int, input().split())))
count = 0

def cat(b, a):
    d = 0
    for j in range(m):
        d += b[j] * a[j]
    return int(d + c)

for i in apple:
    if cat(orange, i) > 0:
        count += 1

print(count)

Solution (Python):
import numpy as np
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
B = np.array(B)

get_count = 0
for i in range(N):
    A  = list(map(int, input().split()))
    A = np.array(A)
    if sum(A*B) + C >0:
        get_count += 1

print(get_count)

Solution (Python):
(n,m,c) = list(map(int,input().split()))
b = list(map(int,input().split()))
a = []
for i in range(n):
  a.append(list(map(int,input().split())))

ans = 0
count = 0
for i in range(n):
  for index in range(m):
    ans += a[i][index]*b[index]
  if ans + c > 0:
    count += 1
  else:
    next
  ans = 0
print(count)

Solution (Python):

N, M, C = map(int, input().split())
B = list(map(int, input().split()))

A = []
a_append = A.append
for i in range(N):
    a = list(map(int, input().split()))
    a_append(a)

success_source_cnt = sum(
    [
        1
        for a in A
        if sum(
            [
                a[i] * B[i]
                for i in range(M)
            ] + [C]
        ) > 0
    ]
)

print(success_source_cnt)

Solution (Python):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split()))for _ in range(N)]
ans = 0

for Ai in A:
    ansi = C
    for i, a in enumerate(Ai):
        ansi += a * B[i]
    if ansi > 0:
        ans += 1
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
b = [int(x) for x in input().split()]
ans = 0
for _ in range(n):
    if sum([b[i] * int(x) for i, x in enumerate(input().split())]) + c > 0:
        ans += 1
print(ans)

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for i in range(n):
  a=list(map(int,input().split()))
  p=c
  for j in range(m):
    p+=a[j]*b[j]
  if p>0:
    count+=1
print(count)

Solution (Python):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for a in A:
  if sum([a[i] * B[i] for i in range(M)]) + C > 0:
    ans += 1
    
print(ans)

Solution (Python):
n,m,c = map(int,input().split())
B = list(map(int,input().split()))
li2=[input() for i in range(n)]
A = []
for i in range(n):
    A.append( [int(x.strip()) for x in li2[i].split()])

ans = 0

for i in range(n):
    var = c
    for j in range(m):
        var += A[i][j]*B[j]
    if var > 0:
       ans += 1
       
print(ans)

Solution (Python):
n,m,c = map(int,input().split())
B = list(map(int,input().split()))
li2=[input() for i in range(n)]
A = []
for i in range(n):
    A.append( [int(x.strip()) for x in li2[i].split()])

ans = 0

for i in range(n):
    var = c
    for j in range(m):
        var += A[i][j]*B[j]
    if var > 0:
       ans += 1
       
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int , input().split()))
ans = 0
for _ in range(n):
    a = list(map(int , input().split()))
    tmp = c
    for i, ai in enumerate(a):
        tmp += ai * b[i]
    if tmp > 0:
        ans += 1
print(ans)

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))

ans = 0

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

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
cou=0
for i in range(n):
    a=list(map(int,input().split()))
    x=c
    for j in range(m):
        x+=a[j]*b[j]
    if x>0:
        cou+=1
print(cou)

Solution (Python):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
ans=0

for i in range(N):
    A=list(map(int,input().split()))
    total=C
    for j in range(M):
        total+=B[j]*A[j]
    if total>0:
        ans+=1

print(ans)

Solution (Python):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A = []
for _ in range(N):
  a=list(map(int,input().split()))
  A.append(a)

ans = 0
for n in range(N):
  score = 0
  a = A[n]
  for m in range(0,M):
    score += a[m] * B[m]
  if score + C > 0:
    ans += 1
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
for i in range(n):
  a = list(map(int, input().split()))
  s = c
  for j in range(m):
    s += a[j]*b[j]
  if s >0:
    count += 1
print(count)

Solution (Python):
x, y, z = map(int, input().split())
lst = list(map(int, input().split()))
cnt = 0
for _ in range(x):
    lst_a = list(map(int, input().split()))
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
    if total > 0:
        cnt += 1
print(cnt)

Solution (Python):
x, y, z = map(int, input().split())
lst = list(map(int, input().split()))
cnt = 0
for _ in range(x):
    lst_a = list(map(int, input().split()))
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
    if total > 0:
        cnt += 1
print(cnt)

Solution (Python):
n, m ,c = map(int, input().split())
b = list(map(int, input().split()))
a = []
for i in range(n):
    aa = list(map(int, input().split()))
    a.append(aa)

s = 0
cnt = 0
for i in range(n):
    for j in range(m):
        s += a[i][j]*b[j]
    if s + c > 0:
        cnt += 1
        s = 0
    else:
        s = 0

print(cnt)

Solution (Python):
def inlt():
    return(list(map(int, input().split())))


def invr():
    return(map(int, input().split()))


n, m, c = invr()
B = inlt()
A = []
for t in range(n):
    A.append(inlt())



correct = 0
for i in range(n):
    s = 0
    for j in range(m):
        s += A[i][j]*B[j]
    s += c
    if s > 0:
        correct += 1
print(correct)

Solution (Python):
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n,m,c = readInts()
b = readInts()
a = []
for i in range(n):
	a.append(readInts())
ans = 0

for i in range(n):
	tmp = c
	for j in range(m):
		tmp+=a[i][j]*b[j]
	if tmp>0:
		ans+=1

print(ans)

Solution (Python):
N,M,C = [int(i) for i in input().split()]

B = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for i in range(N)]

rez = [0]*N

for i in range(M):
  for j in range(N):
    rez[j] += B[i]*A[j][i]

count = 0
for i in rez:
  if i+C>0:
    count+=1
print(count)

Solution (Python):
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
for i in range(n):
    a = list(map(int,input().split()))
    t = c
    for j in range(m):
        t+= a[j]*b[j]
    if t>0:
        cnt+=1
print(cnt)

Solution (Python):

n,m,c=map(int,input().split())
b=[int(x) for x in input().split()]
a=[]
for i in range(n):
    a.append([int(x) for x in input().split()])

cnt=0
for i in range(n):
    p=0
    for j in range(m):
        p+=a[i][j]*b[j]
    if p+c>0:
        cnt+=1
print(cnt)

Solution (Python):
N, M, C = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

ans = 0
for i in range(N):
    A = [int(x) for x in input().split()]
    sum = 0
    for j in range(M):
        sum += A[j] * B[j] 
    if sum + C > 0:
        ans += 1

print(ans)

Solution (Python):
import numpy as np
def resolve():
    count = 0
    li = np.array(list(map(int,input().split())))
    Barray = np.array(list(map(int,input().split())))
    for i in range(li[0]):
        Aarray = np.array(list(map(int,input().split())))
        if np.dot(Barray,Aarray) + li[2] > 0:
            count = count + 1
    print(count)        
resolve()

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
ct=0
for i in range(n):
    ans=0
    a=list(map(int,input().split()))
    for j in range(m):
        if (b[j]==0)or(a[j]==0):
            pass
        else:
            ans+=(b[j]*a[j])
    ans+=c
    if ans>0:
        ct+=1
print(ct)

Solution (Python):
N,M,c=map(int, input().split())
blist = list(map(int, input().split()))
s = 0
for n in range(N):
  l = []
  alist = list(map(int, input().split()))
  for m in range(M):
    l.append(blist[m] * alist[m])
  if sum(l) + c > 0:
    s += 1
print(s)

Solution (Python):
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [list(map(int,input().split())) for _ in range(N)]

ans = 0

for i in range(N):
  count = C
  for j in range(M):
    count += A[i][j]*B[j]
  if count > 0:
    ans += 1
print(ans)

Solution (Python):
N, M, C =map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for n in range(N):
    count = C
    A = list(map(int, input().split()))
    for m in range(M):
        count += A[m] * B[m]
    if count > 0:
        ans += 1
print(ans)

Solution (Python):
N, M, C  = map(int, input().split())

B = list(map(int,input().split()))

count = 0

for i in range(N):
    A = list(map(int, input().split()))
    sum = 0
    for j in range(M):
        sum += A[j] * B[j]
    if (sum + C) > 0:
        count += 1

print(count)

Solution (Python):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy
n, m, c = map(int, input().split())
b  = list(map(int, input().split()))
a=[]
for i in range(n):
    a.append(list(map(int, input().split())))
count = 0
for i in range(n):
    sum = 0
    for j in range(m):
        sum += a[i][j]*b[j]
    if sum + c > 0:
        count += 1

print(count)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N, M, C = [int(x) for x in input().split()]
    B = [int(x) for x in input().split()]
    A = [[int(x) for x in input().split()] for _ in range(N)]

    ans = 0
    for a in A:
        tmp = 0
        for i in range(M):
           tmp += a[i] * B[i]

        if tmp + C > 0:
            ans += 1

    print(ans)




if __name__ == '__main__':
    main()

Solution (Python):
n,m,c = list(map(int,input().split()))
b = list(map(int,input().split()))
cnt = 0
for i in range(n):
    a = list(map(int,input().split()))
    ok = 0
    for j in range(m):
        ok+=a[j]*b[j]
    if ok + c <=0:
        continue
    else:
        cnt+=1

print(cnt)

Solution (Python):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
i=0
ans=0

while i<N:
  A = list(map(int, input().split()))
  j=0
  sum=0
  while j<M:
    sum += A[j]*B[j]
    j+=1
  if sum+C>0:
    ans+=1
  i+=1

print(ans)

Solution (Python):
import numpy as np

N, M, C = map(int, input().split())
B = np.array(list(map(int, input().split())))
A = np.array([list(map(int, input().split())) for _ in range(N)])

ans_list = np.dot(A, B.T) + C * np.ones(N).T
ans = np.count_nonzero(ans_list > 0)
print(ans)

Solution (Python):
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
t = 0
for i in range(N):
  A = list(map(int,input().split()))
  k = C
  for j in range(M):
    k += A[j]*B[j]
  if k > 0:
    t += 1
print(t)

Solution (Python):
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for Ai in A:
    d = 0
    for a, b in zip(Ai, B):
        d += a * b
    d += C
    if d > 0:
        ans += 1
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(n)]
Ans = 0
answer = 0
for i in range(n):
    for j in range(m):
        ans = B[j]*A[i][j]
        Ans += ans 
    Ans = Ans + c
    if Ans >0 :
        answer += 1
    Ans = 0
print(answer)

Solution (Python):
[N,M,C] = list(map(int,input().split()))
B = list(map(int,input().split()))

A = []
for i in range(N):
    A.append(list(map(int,input().split())))

count=0
for i in range(N):
    dammy=0
    for j in range(M):
        dammy +=  A[i][j] * B[j]
    
    if dammy + C > 0:
        count += 1

print(count)

Solution (Python):
I = lambda: map(int, input().split())
N, _, C = I()
*B, = I()
print(sum(sum(a * b for a, b in zip(I(), B)) > -C for _ in range(N)))

Solution (Python):
N, _, C = map(int, input().split())
B = list(map(int, input().split()))
print(sum(sum(a * b for a, b in zip(list(map(int, input().split())), B)) + C > 0 for _ in range(N)))

Solution (Python):
import numpy as np
n,m,c = map(int,input().split())
b = np.array([list(map(int,input().split()))])
ans = 0

for i in range(n):
    a = np.array([list(map(int,input().split()))])
    if np.sum(a*b) + c > 0:
        ans += 1
print(ans)

Solution (Python):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for i in range(n):
    d = 0
    for j in range(m):
        d += a[i][j]*b[j]
    d += c
    if d > 0:
        ans += 1
print(ans)

Solution (Python):
n, m, c =map(int, input().split())
b = [int(x) for x in input().split()]
a = [[int (x) for x in input().split()] for _ in range(n)]

ans = 0
for i in range(n):
    cnt = 0
    for j in range(m):
        cnt += a[i][j] * b[j]
    
    cnt += c
    
    if 0 < cnt:
        ans += 1
        
print(ans)

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n, m, c = mi()
    B = lmi()
    cnt = 0
    for _ in range(n):
        A = lmi()
        if sum([A[i] * B[i] for i in range(m)]) + c > 0:
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()