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.



Sample input:
2 3 -10
1 2 3
3 2 1
1 2 2


Sample output:
1

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = []
k = 0
for i in range(N):
  lis = [int(x) for x in input().split()]
  Alis[i] = lis
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = []
k = 0
for i in range(N):
  Alis.append([int(x) for x in input().split()])
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = [x for x in range(N)]
k = 0
for i in range(N):
  Alis[i] = [int(x) for x in input().split()]
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = []*N
k = 0
for i in range(N):
  Alis[i] = [int(x) for x in input().split()]
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = []*M
k = 0
for i in range(N):
  Alis[i] = [int(x) for x in input().split()]
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
Blis = [int(x) for x in input().split()]
Alis = []
k = 0
for i in range(N):
  Alis[i] = [int(x) for x in input().split()]
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split)
Blis = [int(x) for x in input().split()]
Alis = []
k = 0
for i in range(N):
  Alis[i] = [int(x) for x in input().split()]
for i in range(N):
  total = 0
  for j in range(M):
    total = total + (Alis[i][j])*(Blis[i][j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split)
Blis = [int(x) for x in input().split()]
k = 0
for i in range(N):
  Alis = [int(x) for x in input().split()]
  total = 0
  for j in range(M):
    total = total + (Alis[j])*(Blis[j])
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split)
Blis = [int(x) for x in input().split()]
k = 0
for i in range(N):
  Alis = [int(x) for x in input().split()]
  total = 0
  for j in range(M):
    total = total + Alis[j]*Blis[j]
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split)
Blis = [int(x) for x in input().split()]
k = 0
for i in range(N):
  Alis = [int(x) for x in input().split()]
  total = o
  for j in range(M):
    total = total + Alis[j]*Blis[j]
  total = total + C
  if total > 0:
    k = k + 1
print(k)

Submission status: Runtime Error

Solution code:
N, M, C = map(int input().split())
B = list(map(int input().split()))
A = [list(map(int input().split())) for i in range(N)]
M = list(range(N))
x = 0
for i in M:
    M[i] = A[i] * B[I] + C
    if M[i] > 0:
        x +=
print(x)

Submission status: Runtime Error

Solution code:
import numpy as np
N,M,C=map(int,input().split())
B=[i for i in map(int,input().split())]
A=[]
for i in range(N):
    A1=[i for i in map(int,input().split())]
    A+=[A1]

B=np.array(B)
A=np.array(A)
count=0
for i in range(N):
    if B@A[i].T+C>0:
        count+=1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

if __name__ == '__main__':
    N, M, C = map(int, input().split())
    B = np.array(list(map(int, input().split())))
    A = np.array(list(map(lambda _: list(map(int, input().split())), range(N))))

    scores = np.matmul(A, B)
    print(np.sum(scores > -C))

Submission status: Runtime Error

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

right = 0

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

print(right)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
B = [int(_) for _ in input().split()]
for i in range(1, N + 1):
    Ai = [int(_) for _ in input().split()]

right = 0

for j in range(1,N + 1):
  src = 0
  for k in range(M):
    src += Aj[k] * B[k]
  if src + C > 0:
    right += 1

print(right)

Submission status: Runtime Error

Solution code:
#coding: utf-8
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = list(map(int, input().split())) for _ in range(N))
l []
for i in range(N):
    A = list(map(int, input().split()))
    l.append(sum(A[j] * B[j] for j in range(M)) + C > 0)
print(l)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def judge(A, B, C, M):
	result = C
	for i in range(M):
		result += A[i] * B[i]

	return result > 0

def main():
	N, M, C = map(int, input().split())
	B = map(int, input().split())
	count = 0

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

		if judge(A, B, C, M):
			count += 1

	print(count)



if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
def judge(A, B, C, M):
	result = C
	for i in range(M):
		result += A[i] * B[i]

	return result > 0

def main():
	N, M, C = map(int, input().split())
	B = map(int, input().split())
	count = 0

	for i in N:
		A = map(int, input().split())

		if judge(A, B, C, M):
			count += 1

	print(count)



if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
vdef judge(A, B, C, M):
	result = C
	for i in range(M):
		result += A[i] * B[i]

	return result > 0

def main():
	N, M, C = map(int, input().split())
	B = map(int, input().split())
	count = 0

	for i in N:
		A = map(int, input().split())

		if judge(A, B, C, M):
			count += 1

	print(count)



if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
vdef judge(A, B, C, M):
	result = C
	for i in range(M):
		result += A[i] * A[j]

	return result > 0

def main():
	N, M, C = map(int, input().split())
	B = map(int, input().split())
	count = 0

	for i in N:
		A = map(int, input().split())

		if judge(A, B, C, M):
			count += 1

	print(count)



if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
vdef judge():
	result = C
	for i in range(M):
		result += A[i] * A[j]

	return result > 0

def main():
	N, M, C = map(int, input().split())
	B = map(int, input().split())
	count = 0

	for i in N:
		A = map(int, input().split())

		if judge(A, B, C, M):
			count += 1

	print(count)



if __name__ == '__main__':
	main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

result = len(
    row
    for row in A
    if C + sum([x * y for x, y in zip(row, B)]) > 0
)

print(result)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
b = [(int(i) for i in input().split())]
a = []
for i in range(N):
    a.append([int(i) for i in input().split()])

count = 0
for i in range(N):
    tmp = 0
    for j in range(M):
        tmp += b[j] * a[i][j]
    if tmp + C > 0:
        count += 1

print(count)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
l = []
for i in range(N):
    l.append(list(map(int, input().split())))
for j in range(N):
    sum_ = [l[j][i] * B[i] for i in range(M)]
print(sum([sum_[i] > -C for i in range(N)]))

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
b = [map(int, input().split())]
a = []
for i in range(N):
    a.append([int(i) for i in input().split()])

count = 0
for i in range(N):
    tmp = 0
    for j in range(M):
        tmp += b[j] * a[i][j]
    if tmp + C > 0:
        count += 1

print(count)

Submission status: Runtime Error

Solution code:
s=input().split()
n=int(s[0]);m=int(s[1]);c=int(s[2])
b=input().split();a=[];ans=0
for i in range n : a.append(input().split())
for i in range n :
  temp=0
  for j in range m : temp+=int(a[i][j])*int(b[j])
  if temp+c>0 : ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import numpy as np

IA = lambda: [int(x) for x in input().split()]
IM = lambda N: [IA() for _ in range(N)]
N, M, C = IA()
B = IA()
A = IM(N)
print(((np.matmul(A, B) + C) > 0).sum())

Submission status: Runtime Error

Solution code:
n, m, c = map(int, input().split())
bl = [int(i) for i in input().split()]
ans = 0
for i in range(n):
  al = [int(j) for j in input().split()]
  ans += sum([bl[j] * al[j] for j in range(m)) + c > 0
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
N, M ,C = map(int,input().split())
B_list = list(map(int,input().split()))
count = 0
for i in range(N):
    A = list(map(int,input().split()))
    if np.array(A) @ np.array(B_list) + C > 0:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
 
B = list(map(int, input().split()))
 
ans = 0
 
src = []

for i in range(N):
  src.append(list(map(int, input().split()))) 
  
for i in range(N):
  d += C
  for n in range(M):
    d += src[i][n]*B[n]
  print(d)
  if (d > 0):
    ans+= 1

print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())

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

listA = [list(map(int, input().split())) for _ in range(a)]
t=0

for i in range(a):
    ans=0
    for i in range(b-1):
        s=listB[i]*listA[i]
        s=sum(s)
        ans= ans+s
    if ans+c>0:
        t+=1
print(t)

Submission status: Runtime Error

Solution code:
l = input().split(" ")
n = int(l[0])
m= int(l[1])
c = int(l[2])
count = 0
bn = input().split(" ")
for i in range(m):
    bn[i]= int(bn[i])
for i in range(n):
    an = input().split(" ")
    for j in range(m):
        an[i] = int(an[i])
    ans = 0
    for j in range(m):
        ans = ans + float(an[j])*float(bn[j])
    ans = ans + c
    if (ans>0):
        count = count + 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def f(a):
    """
    xor [0,a]
    """
    ans = 0
    l = []
    d = 2
    while (a+1)//d > 0:
        t = (a+1)//d*(d//2)+max((a+1) % d-d//2, 0)
        ans += (t % 2)*(d//2)
        l.append(t % 2)
        d *= 2
    ans += (((a+1)-d) % 2)*(d//2)
    l.append(((a+1)-d) % 2)
    return l


def solve2(a, b):
    rb = f(b)
    ra = f(a-1)
    for i in range(len(ra)):
        rb[i] ^= ra[i]
    ans = "".join(map(str, reversed(rb)))
    print(int(ans, 2))


A, B = map(int, input().split())
if A == 0 and B == 0:
    print(0)
else:
    solve2(A, B)

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[j] * aitems[j]
  if answer > 0:
    count+=1
print count

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0:
    count+=1
print count

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = [map(int,a_list[i].split())]
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0
    count+=1
print count

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0
    count+=1
print count

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
list_a=[list(map(int,input().split()))]
for i in range(n):
  answer = c
  count = 0
  lista_item = list_a[i]
  for j in range(m):
    answer += input_b[m] * lista_item[m]
  if answer > 0
    count+=1
print count

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
list_a=list(map(int,input().split()))
for i in range(n):
  answer = c
  count = 0
  lista_item = list_a[i]
  for j in range(m):
    answer += input_b[m] * lista_item[m]
  if answer > 0
    count+=1
print count

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
  try:
    list_a=list(map(int,input().split()))
    answer = c
    count = 0
    for lista_item in list_a:
      for i in range(len(lista_item)):
        answer += input_b[i] * lista_item[i]
        if answer > 0
          count+=1
    print count
  except:
    break;

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
  try:
    list_a=list(map(int,input().split()))
    answer = c
    count = 0
    for i in range(len(list_a)):
		answer += input_b[i] * list_a[i]
		if answer > 0
			count+=1
		print count
	except:
		break;

Submission status: Runtime Error

Solution code:
from sys import stdin
n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
	try:
		list_a=list(map(int,input().split()))
		answer = c
		count = 0
		for i in range(len(list_a)):
			answer += input_b[i] * list_a[i]
			if answer > 0
				count+=1
		print count
	except:
		break;

Submission status: Runtime Error

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

count = 0
for n in range(N):
  sum = C
  for m in range(M):
    sum += b[m]*a[n][m]
  if sum > 0:
    count += 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M,C = map(int,input().split())
ab = {}
for i in range(N):
    a,b = map(int,input().split())
    if a in ab.keys():
        ab[a] += b
        continue
    ab[a] = b

keys = sorted(ab.keys())

ans = 0
kosu = 0
for k in keys:
    kosu += ab[k]
    if kosu >= M:
        kosu -= ab[k]
        break
    ans += k * ab[k]

for i in range(ab[k]):
    if kosu == M:
        break
    kosu += 1
    ans += k
print(ans)

Submission status: Runtime Error

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

res = 0
for p in a:
  if sum(i+j for i,j in zip(p,b)) + c > 0:
    res += 1
return res

Submission status: Runtime Error

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

for i in range(20):
	A.append(map(int, input().split()))

ans = 0

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

print(ans)

Submission status: Runtime Error

Solution code:
c = int(input().split())
b = int(input().split())
ans = 0
for n in range(c[0]):
	a[n] = int(input().split())
	tmp = 0
	for m in range(c[1]):
		tmp += b[m] * a[n][m]
	if tmp > -c[2]:
		ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

ans = 0

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c = input().split()
b = input().split()
ans = 0
for n in range(c[0]):
	a[n] = input().split()
	tmp = 0
	for m in range(c[1]):
		tmp += b[m] * a[n][m]
	if tmp > -c[2]:
		ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
n, m, c = [int(i) for i in input().split(" ")]
a_list = input()
i = 0

for i in range(n):
    b_list = input()
    ans = c
    for j in range(m):
        ans += a_list[j] * b_list[j]
    if ans > 0:
        i ++

print(i)

Submission status: Runtime Error

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

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

ans = 0

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

print(ans)

Submission status: Runtime Error

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

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

ans = 0

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
 
n, m, c = map(int, input().split())
 
mp = np.zeros((w, h))
b = list(map(int, input().split()))
num = 0
 
for i in range(n):
  A = list(map(int, input().split()))
  npb = np.array(b)
  npA = np.array(A)
  if np.dot(npA.T, npb) + c > 0:
    num += 1
    
print(num)

Submission status: Runtime Error

Solution code:
N,M,C = list(map(int,input().split()))
import numpy as np
B = np.array(input().split() ,dtype=np.int64)
ret  =0
for i in range(N):
    if( np.sum(np.matmul(B , np.array(input().split() ,dtype=np.int64))) +C>0):
        ret += 1
print(ret)

Submission status: Runtime Error

Solution code:
import numpy as np

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

mp = np.zeros((w, h))
b = list(map(int, input().split()))
num = 0

for i in range(n):
  A = list(map(int, input().split()))
  npb = np.array(b)
  npA = np.array(A)
  if np.dot(npA.T, npb) + c > 0:
    num++
    
print(num)

Submission status: Runtime Error

Solution code:
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()))
    if a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + c > 0:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
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()))

    if a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + c > 0:
         ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
l = input().split(" ")
n = int(l[0])
m= int(l[1])
c = int(l[2])
count = 0
bn = input().split(" ")
for i in range(m):
    bn[i]= int(bn[i])
for i in range(n):
    an = input().split(" ")
    for j in range(m):
        an[i] = int(an[i])
    ans = 0
    for j in range(m):
        ans = ans + int(an[j])*int(bn[j])
    ans = ans + c
    if (ans>0):
        count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
N, M, C = map(int,input().split(' '))
import numpy as np
B = np.array(list(map(int,input().split(' '))))
def f(A, B, C):
    A = np.array(list(map(int,A.split(' '))))
    return np.sum(A*B) +C >  0
print(

Submission status: Runtime Error

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

def solve(a,b,c):
    val = 0
    for ia,ib in zip(a,b):
        val += ia*ib
    val += c
    return val > 0

cnt = 0
for i in range(n):
    a = list(map(int,input().split())
    if solve(a,b,c):
        cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
N, M, C = map(int, input().split())
 
B = list(input().split())
 
ans = []
 
src = []
 
for i in range(N):
  src.append(list(map(int, input().split())))
  
  for n in range(M):
    d = src[i][n]*B[n] + C
    if (d > 0):
      ans.append(1)
 
print(ans.count(1))

Submission status: Runtime Error

Solution code:
"""
B - Can you solve this?
"""


def solve():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))
    ans: int = 0
    for n in range(N):
        A = list(map(int, input().split()))
        AB = [A[i] * B[i] for i in range(len(A))]
        if sum(AB) + C > 0:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Runtime Error

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

B = list(input().split())

ans = []

src = []

for i in range(N):
  src.append(list(map(int, input().split())))
  
  for n in range(N):
    d = src[i][n]*B[n] + C
    if (d > 0):
      ans.append(1)

print(ans.count(1))

Submission status: Runtime Error

Solution code:
n, m, c = map(int, input().split())
B = [*map(int, input().split())]
ans = 0

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

print(ans)

Submission status: Runtime Error

Solution code:
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()))
  s=C+sum([b[j]*a[j] for j in range(m)])
  if s>0:
    cnt +=1
print(cnt)

Submission status: Runtime Error

Solution code:
from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
  	if 0 < C + reduce(lambda p: p[0]*p[1], zip(map(int, input().split()), B)):
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
  	if 0 < C + reduce(lambda p: p[0]*p[1], zip(map(int, input().split()), B)):
    	count += 1
print(count)

Submission status: Runtime Error

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

cnt = 0
for _ in range(N):
    if np.array(list(map(int, input().split()))) @ B + C > 0:
        cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
N,M,C = list(map(int,input().split()))
import numpy as np
B = np.array(input().split() ,dtype=np.int64)
ret  =0
for i in range(N):
    if( np.sum(np.matmul(B , np.array(input().split() ,dtype=np.int64))) +C>0):
        ret += 1
print(ret)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import numpy as np
N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
A = np.array([[int(x) for x in input().split()] for _ in range(N)])

print(np.sum(A@B > -C))

Submission status: Runtime Error

Solution code:
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,b in A,B:
  ans += 1 if sum([i*j for i,j in a,b])+C>0
 print(ans)

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int n,m,c,ans = 0;
	cin >> n >> m >> c;
	int bs[m];
	for (int i = 0; i < m; i++)
	{
		cin >> bs[i];
	}
	for (int i = 0; i < n; i++)
	{
		int res = 0;
		for (int i = 0; i < m; i++)
		{
			int a;
			cin >> a;
			res += a*bs[i];
		}
		ans += rse+c > 0;
	}

	cout << ans << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);cout.precision(20);}} fast;

/* define */
#define FOR(I,X,Y) for(long long (I)=(X);(I)<(Y);(I)++)
#define REP(I,X,Y) for(long long (I)=(Y)-1;(I)>=(X);(I)--)
#define ALL(X) (X).begin(),(X).end()
#define pb push_back
#define COUNT(V,X) (upper_bound((V).begin(),(V).end(),X)-lower_bound((V).begin(),(V).end(),X))
#define debug(x) cerr<<#x<<':'<<x<<endl;
#define DEBUG(v) cerr<<#v<<':';for(auto xXx:v)cerr<<xXx<<' ';cerr<<endl;
#define Yes(X) if(X){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define YES(X) if(X){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define ctoi(C) (C-'0')
#define pow2(x) ((long long)((long long)1<<x))

/* alias */
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vii = vector<vector<int>>;
using vl = vector<long long>;
using vll = vector<vector<long long>>;
using pi = pair<int,int>;
using pl = pair<long long,long long>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

/* const */
const long long dx[] = {1,0,-1,0};
const long long dy[] = {0,1,0,-1};
const long long dx8[] = {1,1,0,-1,-1,-1,0,1};
const long long dy8[] = {0,1,1,1,0,-1,-1,-1};
const long long dx9[] = {1,1,0,-1,-1,-1,0,1,0};
const long long dy9[] = {0,1,1,1,0,-1,-1,-1,0};
const int INF = 1000000007;
const long long LINF = 1000000000000000007;

/* func */
template <typename T> inline bool chmin(T& a, const T& b) {if (a > b) a = b; return a > b;}
template <typename T> inline bool chmax(T& a, const T& b) {if (a < b) a = b; return a < b;}
long long max(long long x,int y){return max(x,(long long)y);}
long long max(int x,long long y){return max((long long)x,y);}
long long min(long long x,int y){return min(x,(long long)y);}
long long min(int x,long long y){return min((long long)x,y);}

/* liblary */



/* main */

signed main(){
	ll N,M,C;
	cin >> N >> M >> C;
	vl B(M);
	FOR(i,0,M)cin >> B[i];
	vector<vl> A(N,vl(M));
	FOR(i,0,N)FOR(j,0,M)cin >> A[i][j];
	ll ans = 0;
	FOR(i,0,N){
		ll SUM = C;
		FOR(j,0,M)SUM += A[i][j] * B[j];
		if(SUM > 0)ans++;
	}
	cout << ans << endl;
}