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())
bm = list(map(int, input().split()))
anm = []
for _ in range(n):
    anm.append(list(map(int, input().split())))
    
count = 0
for i in range(n):
    sumAB = 0
    for j in range(m):
        sumAB += anm[i][j] * bm[j]

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

Submission status: Accepted

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

ls_b = list(map(int, input().split()))
ls_a = [[int(i) for i in input().split()] for _ in range(n)]

cnt = 0
ls_dot = [0] * n

for j in range(n):
    for k in range(m):
        ls_dot[j] += ls_b[k] * ls_a[j][k]
    if ls_dot[j] > -c:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    import numpy as np
    n, m, c = map(int, readline().split())
    ba = list(map(int, read().split()))
    a = np.array(ba[m:]).reshape((n,m))
    b = np.array(ba[:m])

    print(sum(np.dot(a,b)+c>0))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#テストファイルで実行する時
import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')


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

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

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


#print(n,m,c)
#print(a)
#print(b)

test = 0
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
list_1 = list(map(int,input().split()))
list_2 = [list(map(int,input().split())) for i in range(N)]
cnt =0

for i in range(N):
    siki = sum([ list_1[m]*list_2[i][m] for m in range(M)])+C
    if siki >0:
        cnt +=1
print(cnt)

Submission status: Accepted

Solution code:
def F():
    return map(int, input().split())


n, m, c = F()
b = list(F())
print(sum(sum(x*y for x, y in zip(F(), b)) > -c for _ in range(n)))

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
a = [None]*n
for i in range(n):
    a[i] = list(map(int, input().split()))
    sum = c
    for j in range(m):
        sum += a[i][j]*b[j]
    if sum > 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)]
ans = 0
total = 0
for i in range(n):
  for j in range(m):
    if j == m - 1:
      total += a[i][j] * b[j]
      total += c
      if total > 0:
        ans += 1
      total = 0
    else:
      total += a[i][j] * b[j]
print(ans)

Submission status: Accepted

Solution code:
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()))
    a = 0
    for m in range(M):
        a += A[m]*B[m]
    a += C
    if a > 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())))
cnt = 0
for i in range(n):
    mat = 0
    for j in range(m):
        mat += a[i][j]*b[j]
    if mat + 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=[list(map(int,input().split(' '))) for _ in range(N)]

print(sum(list(map(lambda a: int(sum(np.array(a)*B)+C>0),A))))

Submission status: Accepted

Solution code:
# ABC 121: B – Can you solve this?
n, m, c = [int(s) for s in input().split()]
b = [int(s) for s in input().split()]

a = []
for _ in range(n):
    a.append([int(s) for s in input().split()])

counter = 0

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

    if answer > 0:
        counter += 1

print(counter)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [0]*N
for i in range(N):
    A[i] = list(map(int,input().split()))
cnt = 0
for j in range(N):
    sum = 0
    for k in range(M):
        sum += A[j][k]*B[k]
    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 = [input().split(' ') for i in range(N)]
result = 0
for i in range(N):
    ans = 0
    for x in range(M):
        ans = ans + (int(A[i][x]) * B[x])
    if ans + C > 0:
        result = result + 1

print(result)

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

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):
    p=c
    a=list(map(int,input().split()))
    for j in range(m):
        p+=a[j]*b[j]
    if p>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()))
  tmp = C
  for j in range(M):
    tmp += A[j]*B[j]
  if tmp > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

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 = 0
for i in range(n):
  A = np.array(list(map(int, input().split())))
  C = A * B
  test = 0
  for j in range(m):
      test += C[j] 
  test += c
  if test > 0:
    t += 1
print(t)

Submission status: Accepted

Solution code:
# 2019-11-12 22:11:12(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    n, m, c = [int(x) for x in sys.stdin.readline().split()]
    b = [int(x) for x in sys.stdin.readline().split()]
    a = [[int(x) for x in sys.stdin.readline().split()] for _ in range(n)]

    count = 0
    for i in range(n):
        s = c
        for j in range(m):
            s += b[j] * a[i][j]
        if s > 0:
            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()))
a=[[int(i) for i in input().split()] for n in range(n)]
cnt=0
for i in a:
    tmp=0
    for x,j in enumerate(i):
        tmp+=j*b[x]
    tmp+=c
    if tmp>0:
        cnt+=1
print(cnt)

Submission status: Accepted

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

ans = 0
for _ in range(n):
    al = list(map(int,input().split()))
    if sum([a*b for a,b in zip(al, bl)]) + 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=[]
count=0
ans=0
for i in range(n):
  a.append(list(map(int,input().split())))
for i in range(n):
  for j in range(m):
    count += a[i][j]*b[j]
  if count+c>0:
    ans += 1
  count = 0
print(ans)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
ans=0
for i in range(n):
  a=list(map(int,input().split()))
  for j in range(m):
    ans+=a[j]*b[j]
  if (ans+c)>0:
    count+=1
  ans=0
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):
    s = list(map(int,input().split()))
    A.append(s)
ans = 0
for i in A:
    cnt = 0
    for j in range(M):
        cnt += i[j]*B[j]
    if cnt > -C:
        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()]
ct=0
for i in range(n):
    a=[int(x) for x in input().split()]
    su=0
    for j in range(len(a)):
        su+=a[j]*b[j]
    #print(su)
    if(su+c>0):
        ct+=1
print(ct)

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

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


if __name__ == '__main__':
    main()

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

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

print(ans)

Submission status: Accepted

Solution code:
def main(n, m, c, b, a):
    ans = 0

    for _a in a:
        t = 0
        for __a, _b in zip(_a, b):
            t += __a * _b

        t += c

        if t > 0:
            ans += 1

    print(ans)


if __name__ == '__main__':
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]

    main(n, m, c, b, a)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
N, M, C = map(int, input().split())
A = np.zeros((N, M))

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

sum = 0
for i in range(N):
  val = np.inner(B, A[i]) + C
  if(val > 0):
    sum += 1

print(sum)

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.array([list(map(int, input().split())) for _ in range(n)])
res = a * b
cnt = 0
for prog in res:
  if(sum(prog) + 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.array([ list(map(int, input().split())) for _ in range(n) ])
D = np.sum(A*B, axis=1) + c
print(len(D[D > 0]))

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

count = 0
for a in a_s:
  total = 0
  for i in range(len(a)):
    total += a[i]*b[i]
  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()))

ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  s = 0
  for i in range(M):
    s += A[i] * B[i]
  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 = [ list(map(int, input().split())) for _ in range(N) ]

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
count = 0
for i in range(n):
    for j in range(m):
        ans += listb[j]*lista[i][j]
    ans += c
    if ans > 0:
        count += 1
    ans = 0

print(count)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

Solution code:
#Reading input
def read_input():
  first_line = [int(item) for item in input().split()]
  n = first_line[0]
  m = first_line[1]
  c = first_line[2]
  b = [int(item) for item in input().split()]
  A =[]
  for i in range(n):
    A.append([int(item) for item in input().split()])
  return(n,m,c,b,A)

def validate(c,b,a):
  total = 0
  for i in range(len(a)):
    total += b[i]*a[i]
  if total + c>0:
    return 1
  else:
    return 0

def main():
  N,m,c,b,A = read_input()
  total = 0
  for n in range(N):
    total += validate(c,b,A[n])
  print(total)
if __name__ == '__main__':
  main()

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 _ in range(n)]
cnt = 0
for i in range(n):
    s = c
    for j in range(m):
        s += a[i][j] * b[j]
    if s > 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()))
	val = 0
	for j in range(m):
		val += a[j] * b[j]
	val += c
	if val > 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)]
judge = 0
count=0
for i in range(N): #N=2
  for j in range(M): #M=3
    judge += A[i][j]*B[j]
  else:
    judge += C
    if judge>0:
      count += 1
    judge=0
      
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n,m,c = [int(x) for x in stdin.readline().rstrip().split()]
lib = list(map(int,stdin.readline().rstrip().split()))
lia = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
kosuu = 0
for i in range(n):
    point = c
    for j in range(m):
        point += lia[i][j] * lib[j]
    if point > 0:
        kosuu += 1
print(kosuu)

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 = []
for i in range(N):
    A.append(np.array(list(map(int,input().split()))))
count = 0
for i in range(N):
    if sum(list(A[i]*B))+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 karen in range(n):
    a = list(map(int, input().split()))
    sum = c
    for frederica in range(m):
        sum += a[frederica] * b[frederica]
    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 = []
for i in range(n):
  a.append(list(map(int, input().split())))

def inner_product(l1, l2):
  if len(l1) != len(l2):
    print('Error: length mismatch')
  else:
    ans = 0
    for i in range(len(l1)):
      ans += l1[i] * l2[i]
    return(ans)
ans = 0
for i in range(n):
  if inner_product(a[i], 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()))

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:
NMC = input()
NMC_ = NMC.split()
N = int(NMC_[0])
M = int(NMC_[1])
C = int(NMC_[2])
B = input()
B_ = B.split()
B_list = [int(n) for n in B_]
true = 0

for i in range(N):
    s = 0
    A = input()
    A_ = A.split()
    A_list = [int(n) for n in A_]
    for j in range(M):
        s += A_list[j] * B_list[j]
    if s + C > 0:
        true += 1
        
print(true)

Submission status: Accepted

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

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

count = 0
for i in range(N):
  score = (np.array(A)[i, :] * np.array(B)).sum() + C
  if score > 0:
    count += 1

print(count)

Submission status: Accepted

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

ans = 0
for i in range(n):
    counter = 0
    a_L = list(map(int,input().split()))

    for j in range(m):
        counter += a_L[j] * b_L[j]
    counter += c

    if counter > 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 num in range(n)]
cnt = 0
for i in range(n):
    total = [el1 * el2 for (el1, el2) in zip(a[i], b)]
    if sum(total) + c > 0:
        cnt += 1
    else:
        continue
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 n in range(N):
    ans=0
    A=[int(x) for x in input().split()]    
    for m in range(M):
        ans += A[m]*B[m]
    if (ans+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 = []
cnt = 0
for i in range(n):
	a = list(map(int, input().split()))
	wa = 0
	for j in range(m):
		wa += a[j]*b[j]
	if wa+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 = []
for _ in range(N):
    A.append(list(map(int, input().split())))

ans = 0

for n in range(N):
    count = 0
    for m in range(M):
        count += A[n][m] * B[m]
    if count + C > 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()]
A_list = [[int(x) for x in input().split()] for _ in range(N)]
ans = 0
for A in A_list:
    cnt = 0
    for a, b in zip(A, B):
        cnt += a*b
    ans += (cnt + C > 0)
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def main():
    N, M, C = map(int, input().split())
    B = [int(s) for s in input().split()]
    As =  [[int(s) for s in input().split()] for i in range(N)]

    correct_sorce = 0

    for A in As:
        line_score = 0
        for i in range(M):
            line_score += B[i] * A[i]
        if (line_score + C) > 0:
            correct_sorce += 1

    print(correct_sorce)



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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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()])
ans = 0
for i in range(n):
    A = np.array([int(_) for _ in input().split()])
    ans += (A*B).sum() + c >0

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
n,m,c=map(int,input().split())
#print(n)

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


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

#print(ms)
#print(codes)

cnt=0
for j in range(len(codes)):
        x=ms*np.array(codes[j])
        if sum(x)+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 = []
ans = 0
for _ in range(N):
    A.append(list(map(int, input().split())))
for i in range(N):
    tmp = 0
    for j in range(M):
        tmp += A[i][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())
b = list(map(int, input().split()))
l = [list(map(int, input().split())) for _ in range(N)]
cnt = 0
for i in range(N):
    tmpsum=C
    for j in range(M):
        tmpsum += l[i][j]*b[j]
    if(tmpsum > 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(i) for i in input().split()] for _ in range(N)]

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

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

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

print(count)

Submission status: Accepted

Solution code:
import numpy as np
n,m,c = map(int,input().split())
b_np = np.array(list(map(int,input().split())))
ans = 0
for i in range(n):
    a_np = np.array(list(map(int,input().split())))
    if sum(b_np*a_np)+c >0:
        ans +=1
print(ans)

Submission status: Accepted

Solution code:
def cal(Ai,B,C):
    val=0
    for j in range(len(Ai)):
        val+=Ai[j]*B[j]
    val+=C
    return val>0

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

ans=0
for i in range(N):
    Ai=list(map(int,input().split()))
    if cal(Ai,B,C):
        ans+=1

print(ans)

Submission status: Accepted

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

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 i in range(n)])

C = np.dot(A, B.T) + c
print(sum(np.where(C > 0, 1, 0)))

Submission status: Accepted

Solution code:
N,M,C=map(int,input().split())
B=input()
a=[]
for j in range (N):
    a.append([])
    c=input()
    d=c.split()
    a[j]=d
    for k in range (M):
        a[j][k]=int(a[j][k])
B=B.split()
for i in range(len(B)):
    B[i]=int(B[i])
count=0
ans=0
for o in range (len(a)):     
    for l in range (len(B)):
        count=count+a[o][l]*B[l]
    if count+C>0:
        ans+=1
        count=0
    else:
        count=0
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=0
    for j in range(M):
        tmp+=A[j]*B[j]
    if tmp+C>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()]
a = []
for _ in range(n):
    a.append([int(i) for i in input().split()])
    
k = 0
for i in range(n):
    ans = c
    for j in range(m):
        ans += a[i][j] * b[j]
    if ans > 0:
        k += 1
print(k)

Submission status: Accepted

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

A1 = [input().split() for l in range(N)]
A = np.zeros((N,M),dtype="int64")
for i in range (0,N):
  for j in range (0,M):
    A[i,j] = int(A1[i][j])

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

Submission status: Accepted

Solution code:
import numpy as np
n,m,c=map(int,input().split())
b_np = np.array(list(map(int,input().split())))
ans=0
for i in range(n):
	a_np = np.array(list(map(int,input().split())))
	if sum(b_np * a_np)+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(list(map(int,input().split())))
A = []
for _ in range(N):
    A.append(list(map(int,input().split())))
A = np.array(A)
cnt = 0

for i in range(N):
    if sum(A[i] * 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()))
  cal = sum(A*B for A,B in zip(a,b))
  if cal+c>0:
    ans+=1
print(ans)