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: Accepted

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

ok_count = 0

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

    sum = c
    for j in range(m):
        sum += a[i][j] * b[j]

    ok_count += 1 if sum > 0 else 0

print(ok_count)

Submission status: Accepted

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

ans = 0
sum = 0

for i in range(n):
    sum = 0
    for x, y in zip(a[i], b):
        sum += x*y
    if sum + c > 0:
        ans +=1
print(ans)

Submission status: Accepted

Solution code:
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()))
    sums = 0
    for j in range(M):
        sums += A[j]*B[j]
    sums+=C
    if sums > 0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split(' '))
bs = list(map(int, input().split(' ')))
res = 0
for i in range(n):
  if np.dot(list(map(int, input().split(' '))),bs) + c > 0:
    res += 1

print(res)

Submission status: Accepted

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

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

    for j in range(M):
        ans_sum += A[j]*B[j]

    if ans_sum + C > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C=map(int,input().split())
b_list = list(map(int, input().split())) # "1 2 3"と入力
a = []
for i in range(N):
    a.append(list(map(int, input().split())))

import numpy as np
b_list=np.array(b_list)
a=np.array(a)

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

Submission status: Accepted

Solution code:
import numpy as np

N,M,C=list(map(int,input().split()))
B=np.array(list(map(int,input().split())))
A=np.zeros((N,M))
for i in range(N):
    A[i]=list(map(int,input().split()))
    
def calc(a):
    ret=0
    for i in range(M):
        ret+=a[i]*B[i]
    ret+=C
    if ret>0:
        return 1
    return 0

ans=0
for i in range(N):
    ans+=calc(A[i])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
n=0
for i in range(N):
  Ai = list(map(int, input().strip().split(' ')))
  S = C
  j = 0
  while j < M:
    S += Ai[j]*B[j]
    j += 1
  if S > 0 : n += 1
print(n)

Submission status: Accepted

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

As = []
As += [[int(i) for i in input().split()] for _ in range(N)]

def tim(A):
    r = 0
    for i in range(M):
        r += A[i]*Bs[i]
    r += C
    return r > 0

print(sum([tim(A) for A in As]))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

cnt=0
sum=0
for j in range(n):
    for k in range(m):
        ans=lstA[j][k]*lstB[k]
        sum=sum+ans
    if sum+c>0:
        cnt+=1
    sum=0

print(cnt)

Submission status: Accepted

Solution code:
from itertools import starmap
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
k=0
for _ in range(n):
    a=list(map(int,input().split()))
    w=sum(starmap(lambda i,j:i*j,zip(a,b)))+c
    if w>0:
        k+=1
print(k)

Submission status: Accepted

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

res = 0
count = 0
for i in range(n):
    res = 0
    for j in range(m):
        res += anm[i][j]*bm[j]

    res += c
    if res > 0:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
ss = [list(map(int, input().split())) for _ in range(N)]
cnt = 0
for s in ss:
  t = 0
  for i, b in zip(s, B):
    t += i * b
  if (t+C) > 0:
    cnt += 1
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
y = x.split(" ")
parameters = [int(i) for i in y]
N = parameters[0]
M = parameters[1]
C = parameters[2]
x = input()
y = x.split(" ")
B = [int(i) for i in y]
i = N
count = 0
A = [[0] * M for i in range(N)]

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

print(right)

Submission status: Accepted

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(' ')))
    AB = [x * y for (x, y) in zip(A, B)]
    if sum(AB) + C >0 :
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
Bli = list(map(int,input().split()))
Ali = [list(map(int, input().split())) for _ in range(N)]

ans = 0

for A in Ali:
    sumNum = 0
    for num, a in enumerate(A):
        sumNum += a * Bli[num]
        
    if sumNum + C > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for i in range(N):
    s = 0
    for j in range(M):
        s += a[i][j] * b[j]

    s = s + C
    if s > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N,M,C =map(int,input().split())
List=[[int(j) for j in input().split()] for i in range(N+1)]
ANS = 0

# B
for i in range(1,N+1):
    row_sum = 0
    for j in range(M):
        #print("A",List[i][j])
        row_sum += List[i][j] * List[0][j]
    #print(row_sum)
    if row_sum + C > 0:
        ANS +=1

print(ANS)

Submission status: Accepted

Solution code:
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())))
c=0
for i in range(N):
    res=0
    for a,b in zip(A[i],B):
        res+=a*b
    res+=C
    if(res>0):
        c+=1

print(c)

Submission status: Accepted

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

count = 0

for i in range(n):
    total = c
    numsA = list(map(int, input().split()))
    for j in range(m):
        total += numsA[j] * numsB[j]
    if total > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
init = input().split(' ')
init = [int(i) for i in init]
n,m,c = init[0],init[1],init[2]
b = input().split(' ')
b = [int(i) for i in b]

count = 0
try:
	while True:
		inp1 = input().split(' ')
		inp1 = [int(i) for i in inp1]
		score = c
		for j in range(m):
			score += inp1[j]*b[j]
		if score > 0:
			count+= 1
except:
	pass

print(count)

Submission status: Accepted

Solution code:
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)]
ans = 0
for i in range(N):
    ten = 0
    for j in range(M):
        ten += A[i][j] * B[j]
    ten += C
    if ten > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
def ok(aa, bb, c):
    total = 0
    for j,a in enumerate(aa):
        total += a * bb[j]
    total += c
    return total > 0


def solver(aa, bb, c):
    count = 0
    for a in aa:
        if ok(a, bb, c):
            count += 1
    return count

if __name__ == '__main__':

    n, m, c = map(int, input().split())
    bb = list(map(int, input().split()))
    aa = []
    for _ in range(n):
        aa.append(map(int, input().split()))

    ans = solver(aa, bb, c)
    print(ans)

Submission status: Accepted

Solution code:
def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

N, M, C = reads()
B = reads()
ans = 0
for _ in range(N):
  A = reads()
  if sum(A[i] * B[i] for i in range(M)) + C > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
N,M,C = map(int, input().split())
B = input().split()
Bs = np.array([float(b) for b in B])
A = np.zeros((N,M))
for i in range(N):
    A_i = input().split()
    A_i = [float(a) for a in A_i]
    A[i] = A_i
W = np.dot(A,Bs.T)
print(len(W[W+C>0]))

Submission status: Accepted

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

count = 0
for A in A_list:
    x = 0
    for a, b in zip(A, B):
        x += a * b
    x += C
    if x > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:

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

    for j in range(M) :
       sum+=B[j]*A[j]

    sum+=C
    if sum>0:
       count+=1
    sum=0
    A=[]

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
N, M, C = map(int, raw_input().split())
B = map(int, raw_input().split())

count = 0
for n in range(N):
    A = map(int, raw_input().split())
    sum = 0
    for m in range(M):
        sum += A[m] * B[m]

    if sum > -C:
        count += 1

print count

Submission status: Accepted

Solution code:
import numpy as np

parameter = list(map(int,input().split()))
b = list(map(int,input().split()))
B = np.array(b)
X=[]
for i in range(1,parameter[0]+1):
    a = list(map(int,input().split()))
    A = np.array(a)
    D = np.dot(A,B)+parameter[2]
    if D>0:
        X.append(1)
print(len(X))

Submission status: Accepted

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

    sum = C
    for j in range(M):
        sum += A[j] * B[j]

    if sum > 0:
        ans += 1

print(ans)

Submission status: Accepted

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)]

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

Submission status: Accepted

Solution code:
a = input().split()
b = input().split()
count = 0
for i in range(int(a[0])):
  ans = 0
  temp = []
  temp = input().split()
  for j in range(len(temp)):
    ans = ans + int(temp[j])*int(b[j])
  ans = ans + int(a[2])
  if ans> 0:
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
B_lst = list(map(int,input().split()))
count=0
for _ in range(N):
	A_lst = list(map(int,input().split()))
	ans = C
	for a,b in zip(A_lst,B_lst):
		ans += a*b
	if ans > 0:
		count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np

n, m, c = [int(x) for x in input().split()]
bs = np.array([int(x) for x in input().split()])
ass = np.array([[int(x) for x in input().split()] for _ in range(n)])

print((np.dot(ass, bs)+c > 0).sum())

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- Coding: utf-8 -*-


N, M, C = map(int, input().split())
Bn = list(map(int, input().split()))
listA =[]

for i in range(N):
    listA.append(input().split())


cnt = 0
for i in range(N):
    tmp = 0
    for j in range(M):
        tmp += int(listA[i][j]) * int(Bn[j])

    if tmp + int(C) > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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)]

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
N, M, C = [ int(x) for x in 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(' ')])

import numpy
count = 0
for i in range(N):
    if (numpy.dot(A[i], B) + C > 0):
        count += 1

print(count)

Submission status: Accepted

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(list(map(int, input().split())))

cnt=0
for i in range(N):
    plus=0
    for j in range(M):
        plus+=a[i][j]*b[j]
        #print(i,end=' ')
        #print(j)
        
    plus+=C
    if plus>0:
        cnt+=1
print(cnt)

Submission status: Accepted

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

for _ in range(N):
    judge_val = C
    A_list = list(map(int, input().split()))
    for i in range(M):
        judge_val += A_list[i] * B_list[i]
    if judge_val > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
total = 0
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
for i in range(x[0]):
  z = [int(k) for k in input().split()]
  cnt = 0
  for j in range(len(z)):
    cnt += z[j]*y[j]
  if cnt + x[2] > 0:
    total+=1
print(total)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B_list_str = input().split()
B_list = []
for b in B_list_str:
    B_list.append(int(b))
A_row_list = []

cnt = 0
for row in range(N):
    A_list_str = input().split()
    A_list = []
    for a in A_list_str:
        A_list.append(int(a))
    A_row_list.append(A_list)
    row_sum = 0
    for i in range(M):
        row_sum += A_list[i] * B_list[i]
    if row_sum + C > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
 
n, m, c = map(int, input().split())
 
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: Accepted

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

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
Blist = list(map(int,input().split()))
count = 0
for i in range(N):
    Alist = list(map(int,input().split()))
    a = 0
    for j in range(M):
        a += (Blist[j] * Alist[j])
    if a + C > 0:
        count += 1
print(count)

Submission status: Accepted

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)]

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

print(cnt)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]
A = [[int(j) for j in 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]
    if sum + C > 0:
        count += 1

print(count)

Submission status: Accepted

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

for _ in range(N):
    A.append(list(map(int, input().split())))

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
n, m, c = map(int, input().split())
b_list = list(map(int, input().split()))
ans = 0
for _ in range(n):
    a_list = list(map(int, input().split()))
    check = 0
    for i in range(m):
        check += a_list[i] * b_list[i]
    if check + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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)]
d = []
for a in A:
    c = 0
    for i in range(M):
        c += a[i]*B[i]
    d.append(c+C)
print(sum(x>0 for x in d))

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

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

AC = 0
for _ in range(N):
    lst_A = list(map(int, input().split()))
    judge = C
    for a, b in zip(lst_A, lst_B):
        judge += a*b
    if judge > 0:
        AC += 1
print(AC)

Submission status: Accepted

Solution code:
import numpy as np
from sys import stdin
n,m,c = [int(x) for x in stdin.readline().rstrip().split()]
b = [int(x) for x in stdin.readline().rstrip().split()]
data = [stdin.readline().rstrip().split() for _ in range(n)]
data = [[int(i) for i in l] for l in data]
result = 0
for d in data:
    if sum(np.array(d)*np.array(b))+c > 0:
      result+=1
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C= map(int,input().split())
le = list(map(int, input().split()))
a = [0]*N


for i in range(N):
    a[i]=input().rstrip().split()



count = 0
for i in range(N):
    sum = 0
    for j in range(M):
        sum += int(a[i][j])*le[j]

    if sum+C >0:
        count += 1

print(count)

Submission status: Accepted

Solution code:

N, M, C = map(int,input().split())
B = list(map(int, input().split()))
grid = []
for i in range(N):
    array = list(map(int, input().strip().split(' ')))
    grid.append(array)

x = 0


for i in range(N):
    k = C
    for j in range(M):
        k = k + grid[i][j] * B[j]
    if k > 0:
        x = x +1
    else:
        pass

print(x)

Submission status: Accepted

Solution code:
import numpy as np

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

D = np.dot(A, B) + C
print(len(D[D > 0]))

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
bs = list(map(int, input().split()))
numbers = []
for i in range(n):
    numbers.append(list(map(int, input().split())))

ans = 0
for nums in numbers:
    s = 0
    for k in range(m):
        s += bs[k] * nums[k]
    if s + c > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

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

B = list(map(int, input().split()))
Ai = []
for n in range(N):
    Ai.append(list(map(int, input().split())))

B = np.array(B)
count = 0
for a in Ai:
    a = np.array(a)
    if (a * B).sum() + C > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import numpy as np

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

B = np.array(B)
A = np.array(A)
AB = A*B
#ans = [np.sum(AB[i]) + C for i in range(N)]
#ans = np.array(ans)
#ans = np.sum(np.where(ans>0))

ans = 0
for i in range(N):
  if np.sum(AB[i]) + C > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


N, M, C   = [int(i) for i in 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()])

#print([N, M, C])

B = np.array(B)
#print(B)

A = np.array(A)
#print(A)


print(np.sum((np.sum(A * B, axis=1) + C) > np.array(0)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N,M,C=(int(x) for x in input().split())
B=np.array([int(x) for x in input().split()])
count=0
for i in range(N):
	A=np.array([int(x) for x in input().split()])
	if (np.dot(A,B)+C)>0:
		count+=1
print(count)

Submission status: Accepted

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

counter = 0

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


print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
Bs = list(map(int, input().split()))
As = list(list(map(int, input().split())) for _ in range(N))

cnt = 0
for a in As:
    ans = 0
    for i in range(len(a)):
        ans += Bs[i]*a[i]
    ans += C
    
    if ans > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n, m, c = [int(_) for _ in input().split(' ')]
b = [int(_) for _ in input().split(' ')]
a = [[int(_) for _ in input().split(' ')] for __ in range(n)]
print(len([i for i in range(n) if sum([a[i][j] * b[j] for j in range(m)]) + c > 0]))

Submission status: Accepted

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

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
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)])
sum_ = np.array([np.sum(A[i] * B) + C for i in range(N)])
print(np.sum(sum_ > 0))

Submission status: Accepted

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

for i in range(N):
    A = list(map(int, input().split()))
    mul = [a*b for a, b in zip(A, B)]
    mul.append(C)
    if sum(mul) > 0:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
import sys

def isAC (I):
  result = False
  tmp = 0
  for i in range(f_num):
    tmp += I[i] * B[i]
  tmp += C
  if tmp > 0:
    result = True
  return result

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

s_num = a[0]
f_num = a[1]
C = a[2]

a = list(map(int, input().split()))
B = []
for i in a:
  B.append(i)

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

ans = 0
for I in A:
  if isAC(I):
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = [int(_) for _ in input().split()]
B = np.array([int(_) for _ in input().split()])
cnt = 0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    ans = 0

    for i in range(N):
        num = 0
        for Bi, Ai in zip(Bn, An[i]):
            num += Ai * Bi
        if 0 < num + C:
            ans += 1

    print(ans)
    return


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def check_ans(Ai, B, C):
    ans = 0
    for Aij, Bj in zip(Ai, B):
        ans += Aij * Bj
    ans += C
    if ans > 0:
        return True
    else:
        return False
        
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 Ai in A:
    if check_ans(Ai, B, C):
        cnt += 1

print(cnt)

Submission status: Accepted

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