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:
cnt = 0
l = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
for i in range(l[0]):
    s = 0
    a = [int(j) for j in input().split()]
    for k in range(l[1]):
        s += a[k]*b[k]
    if s+l[2]>0:
        cnt += 1
print(cnt)

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

Submission status: Accepted

Solution code:
nmc_data = input()
b_data = input()
nmc = nmc_data.split(" ")
b = b_data.split(" ")

nmc_int = []
for i in range(3):
    nmc_int.append(int(nmc[i]))
b_int = []
for i in range(int(nmc[1])):
    b_int.append(int(b[i]))

answer = 0
for j in range(int(nmc[0])):
    a_data = input()
    a = a_data.split()
    a_int = []
    for k in range(len(a)):
        a_int.append(int(a[k]))
    getsum = nmc_int[2]
    for i in range(nmc_int[1]):
        getsum = getsum + a_int[i] * b_int[i]
    if getsum > 0:
      answer += 1
print(answer)

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

Submission status: Accepted

Solution code:
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()]
a = [[int(x) for x in stdin.readline().rstrip().split()] for _ in range(n)]
ans = 0

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

ans = 0

for i in range(n):
    sum = 0
    for j in range(m):
        sum += a[i][j] * b[j]
    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()))
    value = [A[i]*B[i] for i in range(M)]
    value = sum(value) + C
    if value>0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
#ABC121B-CanYouSolveThis?.py

from sys import stdin

input = stdin.readline

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

correctN = 0

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

print(correctN)

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):
  r = c
  a = list(map(int, input().split()))
  for ai, bi in zip(a, b):
    r += ai * bi
  if r > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
import re
import numpy as np

N, M, C = [int(item) for item in re.split(r"\s", input())]
B = [int(item) for item in re.split(r"\s", input())]

A = []
for _ in range(N):
    A.append([int(item) for item in re.split(r"\s", input())])

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

success = 0
for n in range(N):
    if (A[n] * B).sum() + C > 0:
        success = success + 1

print(success)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mon_n,hen_n,c=map(int,input().split(" "))
b=list(map(int,input().split(" ")))
a=[]
for i in range(mon_n):
    a.append(list(map(int, input().split(" "))))
cnt=0
for i in range(mon_n):
    if sum([a[i][ii]*b[ii] for ii in range(hen_n)])+c>0:
        cnt+=1
print(cnt)

Submission status: Accepted

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


main()

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

Submission status: Accepted

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

N,M,C=[int(_) for _ in input().split()]
aB=[int(_) for _ in input().split()]
def sumArr(aB,C,aA):
    if 0 < sum(map(lambda x:x[0]*x[1],zip(aB,aA))) + C  :
        return 1
    else:
        return 0
print(sum(sumArr(aB,C,(int(_) for _ in input().split())) for _ in range(N)))

Submission status: Accepted

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

import numpy as np

N_s, M_s, C_s = input().split()
N = int(N_s)
M = int(M_s)
C = int(C_s)

B = [int(i) for i in input().split()]
A = []
for rows in range(0,N):
    tmp = [int(i) for i in input().split()]
    A.append(tmp)

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

val = np.dot(A_array, B_array) + C
print(np.sum(val>0))

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

Submission status: Accepted

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)]
ans = 0
for a in A:
  if sum([a[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())
Bi = list(map(int, input().split()))
Ai = [list(map(int, input().split())) for _ in range(N)]

count = 0
for a in Ai:
    s = C
    for i in range(M):
        s += a[i] * Bi[i]
    if s > 0:
        count += 1
print(count)

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()]
ary = [[int(i) for i in input().split()] for j in range(N)]
npb = np.array(b).T
npa = np.zeros((M, N))
npa = np.array(ary)
ans = np.array(np.dot(npa, npb))
count = 0
for res in ans+C:
    if res > 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()]
count=0

for _ in range(N):
    A = [int(i) for i in input().split()]
    s = C
    for i in range(M):
        s += A[i]*B[i]

    if s>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 = []
for i in range(N):
    A.append(list(map(int, input().split())))

X = np.array(A).dot(np.array(B)) + C
cnt = np.sum(X > 0)

print(cnt)

Submission status: Accepted

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


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

Submission status: Accepted

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

cnt = 0

for i in A:
    tmp = 0
    for j, b in zip(i, B):
        tmp += j*b
    tmp += C
    if tmp > 0:
        cnt += 1

print (cnt)

Submission status: Accepted

Solution code:
# Can you solve ?
N, M, C = map(int, input().strip().split())
B = list(map(int, input().strip().split()))
ans = 0
for n in range(N):
	A = list(map(int, input().strip().split()))
	test = 0
	for m in range(M):
		test += A[m]*B[m]
	if test + C > 0:
		ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, _, c = map(int, input().split())
bs = tuple(map(int, input().split()))

count = 0
for _ in range(n):
    if sum(x * y for x, y in zip(map(int, input().split()), bs)) + 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 = []
counter = 0

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

for i in range(N) : 
    sum = C #初期値
    for j in range(M) : 
        sum += A[i][j] * B[j]
    if(sum > 0) : counter += 1

print(counter)

Submission status: Accepted

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

ans =0
for pa in A:
  x = sum(a*b for a,b in zip(pa, B)) + C
  ans += x > 0
print(ans)

Submission status: Accepted

Solution code:
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = []
for _ in range(N):
    A.append(list(map(int, input().split())))
count = 0
for so in A:
    total = 0
    for a, b in zip(so, B):
        total += a*b
    if total + C > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import numpy as np

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

res = np.sum(As * B, axis=1) + C
l = len(np.where(res > 0)[0])

print(l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = list(map(int, input().split(' ')))
B= list(map(int, input().split(' ')))
i=0
for j in range(N):
    ab=0
    A= list(map(int, input().split(' ')))
    for a, b in zip(A,B):
        ab+=a*b
    if ab+C>0:
        i+=1
print(i)

Submission status: Accepted

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

answer = 0

for i in range(N):
  A = [int(x) for x in input().split()]
  assert len(A) == len(B) == M
  if sum([a*b for a, b in zip(A, B)])+C > 0:
    answer += 1

print(answer)

Submission status: Accepted

Solution code:
N, M, C = [int(elem) for elem in input().split()]
B_list = [int(elem) for elem in input().split()]
A_mat = [[int(elem) for elem in input().split()] for _ in range(N)]
assert len(A_mat[0]) == M


num_correct_codes = 0
for A_list in A_mat:
    sum_ = C
    for A, B in zip(A_list, B_list):
        sum_ += A * B
    if sum_ > 0:
        num_correct_codes += 1

print(num_correct_codes)

Submission status: Accepted

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

cnt = 0
for _ in range(N):
    A = [int(s) for s in input().split()]

    r = 0
    for i in range(M):
        r += A[i] * B[i]
    r += C

    if r > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
#abc121b

n,m,c=map(int,raw_input().split())
b=map(int,raw_input().split())
a=[]
for i in xrange(n):
 a.append(map(int,raw_input().split()))
res=0
for i in xrange(n):
 temp=0
 for j in xrange(m):
  temp+=a[i][j]*b[j]
 if temp+c>0:
  res+=1
print res

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

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

for i in range(n):
    problems.append(list(map(int,input().split())))
    
for problem in problems:
    judge = 0
    for i in range(len(problem)):
        judge += problem[i]*b[i]
    if judge + c > 0:
        counter+= 1
        
print(counter)

Submission status: Accepted

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

ans = 0
for _ in range(N):
    A = [int(_) for _ 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:
x = input().split(' ')
n = int(x[0])
m = int(x[1])
c = int(x[2])
temp = []
b = []
ans = 0
b = list(map(int, input().split()))
for i in range(n):
    temp = list(map(int, input().split()))
    sum = 0
    for a in range(m):
        sum += temp[a] * b[a]
    if (sum + 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()))
cnt = 0

for i in range(N):
    A = list(map(int,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()))
ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from operator import mul
from functools import reduce

n, m, c = list(map(int, input().split(" ")))
bs = list(map(int, input().split(" ")))
a_nm = []
for _ in range(n):
    a_m = list(map(int, input().split(" ")))
    a_nm.append(a_m)

ans = 0
tested = [sum([a * b for a, b in zip(a_nm[i], bs)]) + c for i in range(n)]
passed = list(filter(lambda x: x > 0, tested))
print(len(passed))

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

print(cnt)

Submission status: Accepted

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 = A.dot(B)
    print(np.sum(scores > -C))

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

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

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

Submission status: Accepted

Solution code:
N,M,C=map(int,input().split())
base=list(input().split())
base=[int(s) for s in base]
kekka=[]
for i in range(N):
    a=list(input().split())
    a=[int(s) for s in a]
    kekka.append(a)
count=0

#print(base)
#print(kekka)
for i in range(N):
    summ=C
    for j in range(M):
        summ+=base[j]*kekka[i][j]
    if summ>0:
        #print(base[j],kekka[i]
        count+=1
print(count)

Submission status: Accepted

Solution code:
n, m, c =map(int, input().split())
b = list(map(int, input().split()))
a_s = []
for i in range(n):
    a_s.append(list(map(int, input().split())))
cnt = 0
for i in range(n):
    a = a_s[i]
    ans = 0
    for i in range(m):
        ans += a[i]*b[i]
    ans += c
    if ans > 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()]
cnt=0
for i in range(N):
    x=0
    for num,a in enumerate(input().split()):
        x+=B[num]*int(a)
    if(x>(-1)*C):
        cnt+=1
print(cnt)

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

print(ans)

Submission status: Accepted

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

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

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

print(count)

Submission status: Accepted

Solution code:
I=lambda:map(int,input().split());n,m,c=I();*b,=I();print(eval('+(-c<sum(x*y for x,y in zip(I(),b)))'*n))

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

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

Solution code:
N,M,C = map(int,input().split())
weight = list(map(int,input().split()))
ans = 0
for i in range(N):
  feature = list(map(int,input().split()))
  feature = [f*w for f,w in zip(feature,weight)]
  if (sum(feature) + C) > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,M,C = (int(i) for i in input().split())
B = list(int(i) for i in input().split())
cnt = 0
# N個のソースコードを1個ずつ正しいかを確かめるfor文
for i in range(N):
    judge = 0
    A = list(int(i) for i in input().split())
    # Aの列を1個ずつ正しいかを確かめるfor文
    for j in range(M):
        judge += A[j] * B[j]
        # ここにif文を置かない(2回目のfor文でカウントされてしまうので)
    if judge + C > 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=[list(map(int,input().split())) for i 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: Accepted

Solution code:
n,m,c = (int(i) for i in input().split())
b = list(int(i) for i in input().split())
ct = 0

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

Submission status: Accepted

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

for i in range(n):
  a = input().split()
  sum = 0
  for ai, bi in zip(a, b):
    sum += int(ai)*int(bi)
  if 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()))
a = [list(map(int, input().split())) for _ in range(n)]

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

print(ans)

Submission status: Accepted

Solution code:
def compute(a, b, c):
    val = c
    for i in range(len(a)):
        val += a[i]*b[i]
    return val

n,m,c=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
count=0
for i in range(n):
    a=[int(x) for x in input().split()]
    if compute(a,b,c)>0:
        count = count + 1
print(count)

Submission status: Accepted

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

counter = 0
for i in range(n):
    x = 0
    for j in range(m):
        x += As[i][j] * Bs[j]
    x += c
    if x > 0:
        counter += 1
print(counter)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = sum(sum(a * b for a, b in zip(A[i], B)) + C > 0 for i in range(N))
print(ans)

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 j in range(n)]
sum=0
for i in range(n):
    tmp=0
    for j in range(m):
        tmp+=(a[i][j]*b[j])
        
    if tmp+c>0:
        sum+=1

print(sum)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for _ in range(n):
    ret = 0
    for a, b in zip(map(int, input().split()), B):
        ret += a * b
    if ret + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

counter = 0

for x in range(N):
    all = C
    xlist = Alist[x]
    for j in range(M):
        all += Blist[j]*xlist[j]
    if all>0:
        counter += 1

print(counter)

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 _ in range(n)]
B = np.array(b)
A = np.array(a)
count = 0
for i in range(n):
    if sum(B * A[i]) + 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 i in range(n)]
ans=0
for i in range(n):
  ct=c
  for j in range(m):
    ct+=a[i][j]*b[j]
  if ct>0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys

def parse(inp):
    n,m,c=map(int,next(inp).split())
    B=list(map(int,next(inp).split()))
    A=[[] for _ in range(n)]
    
    for i in range(n):
        A[i]=list(map(int,next(inp).split()))
        
    return n,m,c,A,B
  
def main(inp):
    n,m,c,A,B=inp
    ans=0
    
    for i in range(n):
        code=0
        for j in range(m):
            code += A[i][j]*B[j]
            
        if(code+c>0): ans+=1
            
    return ans
  
print(main(parse(sys.stdin)))

Submission status: Accepted

Solution code:
#coding: utf-8
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
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(sum(l))

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 d in range(n)]
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: Accepted

Solution code:
n, _, c = map(int, input().split())
bs = tuple(map(int, input().split()))

count = 0
for _ in range(n):
    if sum(x * bs[i] for i, x in enumerate(map(int, input().split()))) + c > 0:
        count += 1

print(count)

Submission status: Accepted

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

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

correct = 0

for a in A:
  ok = 0
  for item_a, item_b in zip(a, B):
    ok += item_a * item_b
  ok += C
  if ok > 0:
    correct += 1
    
print(correct)

Submission status: Accepted

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

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

res = 0

for A in _input:
    cal = 0
    for a,b in zip(A,B):
        cal += a * b
    if cal + C > 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 _ in range(N):
  A = list(map(int, input().split()))
  x = C
  for a, b in zip(A, B):
    x += a*b
  if x > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

out_num=0

for n in range(N):
  A=[int(x) for x in input().split()]
  a=[A[i]*B[i] for i in range(M)]
  check=sum(a)+C
  if check>0:
    out_num+=1
    
print(out_num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split())
B = np.array([int(i) for i in input().split()])
inputs = [
    sum(np.array([int(i) for i in input().split()]) * B) + C for _ in range(N)
]

print(sum([1 if inputs[i] > 0 else 0 for i in range(N)]))

Submission status: Accepted

Solution code:
import numpy as np

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

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
m = list(map(int,input().split()))
b = list(map(int,input().split()))
n=0
for k in range(m[0]):
  acc = 0
  for z,k in zip(list(map(int,input().split())), b):
    acc += z*k
  if acc + m[2] > 0:
    n += 1
print(n)

Submission status: Accepted

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 = [int(x) for x in input().split()]
	count = 0

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

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

	print(count)



if __name__ == '__main__':
	main()

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()))
    if sum(a[j]*b[j] for j in range(m)) + 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 = [None] * N

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

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

print(len([i for i in (np.sum(A * B, axis=1) + C).tolist() if i > 0]))

Submission status: Accepted

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

Submission status: Accepted

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