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()))
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 > 0:
        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())))

count = 0
for i in range(N):
    x = 0
    for j in range(M):
        x += A[i][j] * B[j]
    if (x+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 n in range(N):
	A.append(list(map(int, input().split())))
x = 0
for i in range(N):
	y = 0
	for k in range(M):
		y = y + A[i][k] * B[k]
	if y + C > 0:
		x = x + 1
print(x)

Submission status: Accepted

Solution code:
import sys

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

#print(N, M, C, b_list, a_list)

ans = 0

for i in range(len(a_list)):
    tmp = 0
    for j in range(len(a_list[i])):
        tmp += a_list[i][j] * b_list[j]
    if tmp + 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())))

score_list=[]
for a in A:
    score = 0
    for _a, _b in zip(a,B):
        score += _a * _b
    score += c
    score_list.append(score)

# print(A)
# print(score_list)

print(sum([1 if i>0 else 0 for i in score_list]))

Submission status: Accepted

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

A = [0] * N
ans = 0
for n in range(N):
    A[n] = list(map(int, input().split()))

    calc = 0
    for m in range(M):
        calc += B[m] * A[n][m]

    if calc + C > 0:
        ans += 1
print(ans)

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()))
    ans += 1 if sum([aa*bb for aa, bb in zip(a, b)])+c > 0 else 0
print(ans)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
b = [int(x) for x in input().split()]
l = []
tmp = []
judge = c
for i in range(n):
  tmp = [int(x) for x in input().split()]
  l.append(tmp)
count = 0
for i in range(n):
  for k in range(m):
    judge += b[k]*l[i][k]
  if judge > 0:
    count += 1
  judge = c
print(count)

Submission status: Accepted

Solution code:
import numpy as np
 
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()))
    if np.sum(np.array(A)*np.array(B)) + C> 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

s = input().rstrip().split(' ')
n, m, c = int(s[0]),int(s[1]),int(s[2])

b = input().rstrip().split(' ')

a = []
count = 0
sum = c
for i in range(n):
    a = input().rstrip().split(' ')
    for j in range(m):
        sum += int(a[j])*int(b[j])
    a.clear()
    if sum > 0:
        count += 1
    sum = c

print(count)

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):
  Ai=list(map(int,input().split()))
  sum=c
  for j in range(m):
    sum+=Ai[j]*B[j]
  if sum>0:
    counter+=1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

A = [None] * N

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

A = np.array(A)

ans = A.dot(B.reshape((-1, 1))) > -C
print(sum(ans)[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):
    f = 0
    A = list(map(int,input().split()))
    for j in range(M):
        f += A[j]*B[j]
    f += C
    if f > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int,raw_input().split())
b = map(int,raw_input().split())
a = []
count = 0
for i in range(n):
	total = 0
	a = map(int, raw_input().split())
	for j in range(m):
		multi = a[j] * b[j]
		total += multi
	if total + c > 0:
		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(' ')]
 
r = 0
for i in range(n):
  a = [int(i) for i in input().split(' ')]
  s = 0
  for j in range(m):
    s += a[j] * b[j]
  s += c
  if s > 0:
    r += 1
  
print(r)

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)]
ABC = [sum([ A[n][i]*B[i] for i in range(M)]) + C for n in range(N)]
res = len([i for i in ABC if i>0])
print(res)

Submission status: Accepted

Solution code:
n, m, c = [int(i) for i in 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()]
    if sum(_a*_b for  _a,_b in zip(a,b)) + 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 = []
for i in range(N):
    A.append(list(map(int, input().split(' '))))
AB = []
for i in range(len(A)):
    matmul = C
    for j in range(len(B)):
        matmul += A[i][j] * B[j]
    AB.append(1 if matmul > 0 else 0)
print(sum(AB))

Submission status: Accepted

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

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

print(ct)

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

ct = 0
for i in A:
    if sum([j * k for j, k in zip(i, B)]) + C > 0:
        ct += 1

print(ct)

Submission status: Accepted

Solution code:
import numpy as np
nmc=list(map(int,input().split()))
n=nmc[0]
m=nmc[1]
b=list(map(int,input().split()))
a=[0 for i in range(n)]
ans=0
for i in range(n):
    a[i] = list(map(int,input().split()))
    if np.dot(a[i],b)+nmc[2]>0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
base = list(map(int,input().split()))
cross = list(map(int,input().split()))
counter = 0
for i in range(base[0]):
    source = list(map(int,input().split()))
    point = 0
    for j in range(base[1]):
        point = point + cross[j]*source[j]
    
    if point+base[2] >0:
        counter = counter+1

print(counter)

Submission status: Accepted

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

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

count = 0
calc_n = 0
while calc_n < n:
    ab = 0
    calc_m = 0
    while calc_m < m:
        ab += a[calc_n][calc_m] * b[calc_m]
        calc_m += 1
    check = ab + c
    if check > 0:
        count += 1
    calc_n += 1
print(count)

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
b_list = list(map(int,input().split()))
cnt = 0
for i in range(N):
    s = 0
    a_list = list(map(int,input().split()))
    for i in range(M):
        s += a_list[i]*b_list[i]
    if s + C > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split())
B = np.array(list(map(int, input().split())))
A = np.empty((N, M),dtype=int)
for n in range(N):
    A[n, :] = list(map(int, input().split()))
X = np.dot(A, B) + C
print(len(X[X>0]))

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())))
    
ans = 0
for i in range(N):
    Q = [A[i][j] * x for j, x in enumerate(B)]
    if sum(Q) + C > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input().split()
n,m,c = int(x[0]),int(x[1]),int(x[2])


b =  []
y = input().split()
for i in y:
    b.append(int(i))

a = []

for i in range(n):
    z = input().split()
    dd = []
    for w in z:
        dd.append(int(w))
    a.append(dd)


count = 0
for i in range(len(a)):
    hasil = 0
    for j in range(len(a[i])):
        hasil += a[i][j] * b[j]
    hasil += c
    #print(hasil)
    if hasil > 0:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for _ in range(N):
    A = list(map(int, input().split()))
    if sum(a * b for a, b in zip(A, B)) > -C:
        ans += 1

print(ans)

Submission status: Accepted

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

count = 0
for i in range(N):
    a_list = list(map(int,input().split()))
    sum = 0
    for j in range(M):
        sum += a_list[j]*b_list[j]
    if 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 = [ input().split() for i in range(N)] 
for i in range(N):
    A[i] = [int(j) for j in A[i]]

B = np.array(B)
A = np.array(A)

sum = np.dot(B,A.T)
print(np.sum(sum>-C))

Submission status: Accepted

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

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()))
    s = c
    for i in range(m):
        s += a[i] * b[i]
    if s > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def solve(a_list, b_list, c):
    ans = c
    for index in range(len(a_list)):
        ans += a_list[index] * b_list[index]
    return int(ans > 0)


def main():
    n, m, c = map(int, input().split())
    b_list = list(map(int, input().split()))

    count = 0
    for _ in range(n):
        a_list = list(map(int, input().split()))
        count += solve(a_list, b_list, c)
    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
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)]
def naiseki(A,B,M):
    res = 0
    for i in range(M):
        res = res + A[i]*B[i]
    return res
def solve(N,M,C):
    res = 0
    for i in A:
        if naiseki(i,B,M) + C > 0:
            res = res + 1
    return res
print(solve(N,M,C))

Submission status: Accepted

Solution code:
import numpy as np

def main():
    n, m, c = list(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 = sum([1 if x + c > 0 else 0 for x in list(np.dot(a, b))])
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(N):
    A_list.append(list(map(int, input().split())))

# print("==================")
# print(N, M, C)
# print("==================")
# print(B_list)
# print("==================")
# print(A_list)
# print("==================")

success_count = 0

for my_list in A_list:
    num = 0
    for i in range(len(my_list)):
        num = num + my_list[i] * B_list[i]
    num = num + C

    if num > 0:
        success_count = success_count + 1

print(success_count)

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()))
    total = sum([A[j] * B[j] for j in range(M)])
    if total + 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):
  sum=0
  a=list(map(int,input().split()))
  for j in range(m):
    sum+=a[j]*b[j]
  if sum>-c:
    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 = [[int(i) for i in input().split()] for _ in range(N)]
count = 0
for i in range(N):
    if(sum(j[0]*j[1] for j in zip(A[i],B))+C>0):
        count = count + 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np

A = []
B = []
N, M, C = (int(x) for x in input().split())
for x in input().split():
    B.append(int(x))
for i in range(N):
    temp = []
    for x in input().split():
        temp.append(int(x))
    A.append(temp)

def Function(i):
    ret = C
    for k in range(M):
        ret += A[i][k] * B[k]
    return ret

ans = 0
for i in range(N):
    if Function(i) > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
tmp = list(map(int, input().split()))
N, M, C = tmp[0], tmp[1], tmp[2]
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]
  sum += C
  if sum > 0:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n, m, c = (int(i) for i in input().split())
B = [int(i) for i in input().split()]
calc = 0
ans = 0
for i in range(n):
    A = [int(i) for i in input().split()]
    calc = 0
    for j in range(m):
        calc +=  A[j] * B[j]
    if 0 < calc + c:
        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()))
ans = 0

for _ in range(N):
    a = list(map(int, input().split()))
    if np.dot(a, b) + C > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

N,M,C = map(int, input().split())
B = np.array(input().split(), dtype=float)

A = np.zeros((N,M))
for i in range(N):
    A[i,:] = np.array(input().split(), dtype=float)

print(np.sum((np.dot(A,B)+C > 0)))

Submission status: Accepted

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

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

ans = 0

for n in range(N):
    c = C
    A = [int(i) for i in input().split()]
    for m in range(M):
        c += B[m]*A[m]
    if 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 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 = [list(map(int, input().split())) for _ in range(N)]
print(sum([(sum([a*b for a,b in zip(B,i)]) + C) > 0 for i in A]))

Submission status: Accepted

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

count = 0
for i in range(N):
  A = [int(i) for i in input().split()]
  f = C
  for a, b in zip(A, B):
    f += a * b
  if f > 0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split(' '))
B = [int(b) for b in input().split(' ')]
results = []
for i in range(N):
    A = [int(a) for a in input().split(' ')]
    result = 0
    for a, b in zip(A, B):
        result += a * b
    result += C
    if result > 0:
        results.append(result)
print(len(results))

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)]
ans = 0

for i in A:
    res = 0
    for j in range(len(i)):
        res += i[j]*B[j]

    if res + 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()))
r = 0
for i in range(N):
  A = list(map(int, input().split()))
  s = C
  for j in range(M):
    s += A[j]*B[j]
  r += 1 if s>0 else 0
print(r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int, raw_input().split())
B = map(int, raw_input().split())
count = 0
for i in range(N):
    A = map(int, raw_input().split())
    mul = [x*y for (x,y) in zip(A,B)]
    if int(sum(mul))+C > 0:
        count += 1
print count

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(np.sum(np.sum(a * b, axis=-1) + c > 0))

Submission status: Accepted

Solution code:
N, M , C = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
for _ in range(N):
    tmp = 0
    for x ,y in zip(map(int,input().split()),L):
        tmp += x * y
    if tmp + C > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def is_int(s):
    try:
        i = int(s)
    except:
        return False
    return True

stdin = input().split()

if (len(stdin) > 3):
    print("Too many arguments.")
    exit()
elif (len(stdin) < 3):
    print("Too few arguments.")
    exit()
elif (not is_int(stdin[0])):
    print("N is not a number.")
    exit()
elif (not is_int(stdin[1])):
    print("M is not a number.")
    exit()
elif (not is_int(stdin[2])):
    print("C is not a number.")
    exit()

N = int(stdin[0])
M = int(stdin[1])
C = int(stdin[2])

if (N < 1 or N > 20):
    print("Out of range at N.")
    exit()
elif (M < 1 or M > 20):
    print("Out of range at M.")
    exit()
elif (C < -100 or C > 100):
    print("Out of range at C.")
    exit()

stdin = input().split()

if (len(stdin) > M):
    print("Too many arguments.")
    exit()
elif (len(stdin) < M):
    print("Too few arguments.")
    exit()

B = []

for index, value in enumerate(stdin):
    if (not is_int(value)):
        print("B[%d] is not a number." % (index + 1))
        exit()

    B.append(int(value))

for index, value in enumerate(B):
    if (value < -100 or value > 100):
        print("Out of range at B[%d]." % (index + 1))
        exit()

A = [[] for j in range(N)]

for i in range(0, N):
    stdin = input().split()

    if (len(stdin) > M):
        print("Too many arguments.")
        exit()
    elif (len(stdin) < M):
        print("Too few arguments.")
        exit()

    for index, value in enumerate(stdin):
        if (not is_int(value)):
            print("A[%d][%d] is not a number." % ((i + 1), (index + 1)))
            exit()

        A[i].append(int(value))

    for index, value in enumerate(A[i]):
        if (value < -100 or value > 100):
            print("Out of range at A[%d][%d]." % ((i + 1), (index + 1)))
            exit()

right_answer = 0

for i in A:
    sum = 0

    for index, value in enumerate(i):
        sum += value * B[index]

    sum += C

    if (sum > 0):
        right_answer += 1

print(right_answer)

Submission status: Accepted

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

main()

Submission status: Accepted

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

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 += b[j]*a[i][j]
	if(sum+c > 0):
		count += 1

print(count)

Submission status: Accepted

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

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

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

print(ans)

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):
    res = c
    A = list(map(int, input().split()))
    for a, b in zip(A, B):
        res += a*b
    if res > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():

    N, M, C = map(int, input().split())
    B = [int(b) for b in input().split()]
    A = [None]*N
    for n in range(N):
        A[n] = [int(a) for a in input().split()]

    count = 0

    for n in range(N):
        dot = C
        for m in range(M):
            dot += A[n][m]*B[m]
        if dot > 0:
            count += 1

    print(count)


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Can you solve this?
https://atcoder.jp/contests/abc121/tasks/abc121_b

"""
import sys


def solve(A, B, C):
    ans = 0
    for a in A:
        if sum([x*y for x, y in zip(B, a)]) + C > 0:
            ans += 1
    return ans


def main(args):
    N, M, C = map(int, input().split())
    B = [int(i) for i in input().split()]
    A = []
    for _ in range(N):
        A.append([int(i) for i in input().split()])
    ans = solve(A, B, C)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
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())
    total = 0
    for a, b in zip(a_list, b_list):
        total += a * b
    if total + C > 0:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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(j) for j in input().split()])

cnt = 0
for i in range(n):
  seki = [i*j for i,j in zip(a[i],b)]
  wa = sum(seki)
  r = wa + c
  if r > 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=[]
for i in range(N):
    A = list(map(int,input().split()))
    A_list.append(A)

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

Submission status: Accepted

Solution code:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    """
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(np.sum(np.dot(a, b.T) > -c))
    """
    ans = 0
    for i in range(n):
        tmp = c
        for j in range(m):
            tmp += ba[j] * ba[(i + 1) * m + j]
        if tmp > 0:
            ans += 1
    return str(ans)


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

Solution code:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    """
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(np.sum(np.dot(a, b.T) > -c))
    """
    b = ba[:m]
    s, t = m, 2 * m
    ans = 0
    while s < (n + 1) * m:
        if sum([_b * _a for _b, _a in zip(b, ba[s:t])]) + c > 0:
            ans += 1
        s, t = t, t + m
    return str(ans)


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

Solution code:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(np.sum(np.dot(a,b.T) + c > 0))


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

Solution code:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(np.sum(np.dot(a,b.T) > -c))


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))