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:
input_line = input()
info = [int(x) for x in input_line.split()]
N, M, C = info[0], info[1], info[2]
inputB = input()
B_list = [int(x) for x in inputB.split()]

count = 0
for i in range(N):
    inputA = input()
    A_list = [int(x) for x in inputA.split()]
    ans = C
    for m in range(M):
        ans += A_list[m]*B_list[m]
    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()))
count = 0
for i in range(N):
    A = list(map(int, input().split()))
    x = C
    for index, val in enumerate(B):
        x += A[index] * val
    if x > 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 = [0]*n 
for i in range(n):
  a[i] = list(map(int,input().split()))

a_array = np.array(a)
b_array = np.array(b)
count = 0  
for i in range(n):
  if np.sum(a_array[i]*b_array) > -c:
    count += 1

print(count)

Submission status: Accepted

Solution code:
import sys

n, m, c = map(int, sys.stdin.readline().split())
blist = list([int(i) for i in sys.stdin.readline().split()])

ans = 0
for _ in range(n):
    tmp = list([int(i) for i in sys.stdin.readline().split()])
    check = c
    for i in range(m):
        check += tmp[i] * blist[i]
    if check > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

ANMs = [list(map(int,input().split())) for _ in range(N)]

count = 0
for i in range(N):
	mySum = 0
	for j in range(len(BMs)):
		mySum += (ANMs[i][j] * BMs[j])
		
	#print(mySum)
	if mySum > -C:
		count += 1
print(count)

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

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

print(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(0, N):
    A = list(map(int, input().split()))
    judge = 0
    for j in range(0, M):
        judge = judge+A[j]*B[j]
    if judge+C>0:
        count = count+1
print("{}".format(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):
    A=list(map(int,input().split()))
    tmp=C
    for j in range(M):
        tmp+=A[j]*B[j]
    if tmp>0:
        cnt+=1
print(cnt)

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()])
A = np.array([[int(x) for x in input().split()] for i in range(N)])

print(len([x for x in (np.dot(A, B.T) + C) if x >0]))

Submission status: Accepted

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

import numpy as np

NMC=list(map(int,input().split()))
B=list(map(int,input().split()))

A=[0]*NMC[0]
count=0

for i in range(int(NMC[0])):
	A[i]=list(map(int,input().split()))
A=np.array(A)
B=np.array(B)
B=B[np.newaxis,:]
for i in range(NMC[0]):
	if np.sum(A[i,:]*B[0,:])+NMC[2]>0:
		count=count+1
print(count)

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())))
ans = 0
for i in range(n):
    num = 0
    for j in range(m):
        num += (b_list[j]*a_list[i][j])
    num += c
    if num > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
ans = 0 #答え用変数

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
for i in range(N): #Aを１行ずつ読み込む
  A = list(map(int, input().split()))
  
  sum = 0 #sum AB
  
  for p in range(M):
    sum += (A[p] * B[p])
  if sum + C > 0:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
N,M,C=map(int, input().split())
# N:Aのソースコード(配列)数
# M:AとBの配列の中身の数
# C:計算で利用

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


print(x)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split(" "))
B = np.array(list(map(int, input().split(" "))))
A = []
for i in range(N) :
    A.append(np.array(list(map(int, input().split(" ")))))
    
cnt = 0
for i in range(N) :
    if np.dot(B, A[i]) + 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()))
    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())
Bs = list(map(int, input().split()))
As = [map(int, input().split()) for i in range(n)]

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

Submission status: Accepted

Solution code:
N,M,C = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]
As = [[int(s) for s in input().split()] for i in range(N)]
print(len(list(filter(lambda A: sum([a*b for a, b in zip(A, B)])+C > 0, As))))

Submission status: Accepted

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

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

print(co)

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()])
A = np.array([[int(i) for i in input().split()] for _ in range(N)])
cnt = 0

for i in np.dot(A, B)+C:
    if i > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
def multiply(A, B):                                                  
    ret = 0
    for i in range(len(A)):                                          
        ret += A[i]*B[i]                                             
    
    return ret                                                       
                                                                     

def can_you_solve_this(A, B, C):
    return multiply(A, B) + C > 0                                    
                                                                     

if __name__ == "__main__":
    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 can_you_solve_this(A, B, C):                              
            count += 1                                               
    
    print(count)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
listB = list(map(int, input().split()))
index=0
count=0
while index < n:
    listA = list(map(int, input().split()))
    index2=0
    sum=0
    while index2 < m:
        sum+=listA[index2]*listB[index2]
        index2+=1
    if sum + c > 0:
        count+=1
    index+=1
print(count)

Submission status: Accepted

Solution code:
import sys
import numpy as np

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: np.array(list(map(int, stdin.readline().split())))
ns = lambda: stdin.readline().rstrip()

n, m, c = na()
b = na()
ans = 0
for i in range(n):
    a = na()
    s = c
    s += np.sum(a * b)
    if s > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
import numpy as np

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n, m, c = np.array(na())
b = np.array(na())
ans = 0
for i in range(n):
    a = np.array(na())
    s = c
    s += np.sum(a * b)
    if s > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

NMC = list(map(int,input().split(" ")))
B = np.array(list(map(int,input().split(" "))))
A = [np.array(list(map(int,input().split(" ")))) for i in range(NMC[0])]
_ = []
for i in range(NMC[0]):
    _.append(np.dot(B,A[i])+NMC[2]>0)
print(_.count(True))

Submission status: Accepted

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

print(ret)

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add
N,M,C=map(int,input().split())
B = [int(i) for i in input().split()]
A=[]
ans = 0
for i in range(N):
    A = [int(i) for i in input().split()]
    AB = [A[i]*B[i] for i in range(M)]
    result = reduce(add,AB)+C
    if result>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()))
    sum=0
    for j in range(M):
        sum= A[j]*B[j] +sum
    sum=C+sum
    
    if sum>0:
        count=count+1

print(count)

Submission status: Accepted

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

for i in range(N):
    a=0
    for j in range(M):
        a+=A[i][j]*B[j]
    if a+C>0:
        ct+=1
    else:
        pass
print(ct)

Submission status: Accepted

Solution code:
#coding: utf-8
import numpy as np

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

b = np.array(map(int, raw_input().split()))

counter = 0
for i in range(n):
    a = np.array(map(int, raw_input().split()))
    if(sum(a*b)+c > 0): counter += 1

print(counter)

Submission status: Accepted

Solution code:
def main():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split())) # 配列として格納
    A = [[] for i in range(N)]
    for i in range(N):
        A[i] = list(map(int, input().split()))

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

main()

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.append([int(x) for x in input().split()])
cnt = 0
for an in a:
    dot = 0
    for i, j in zip(an, b):
        dot += i*j
    dot += c
    cnt += int(dot>0)
    
print(cnt)

Submission status: Accepted

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

ans = 0
for AList in ALists:
    point = C
    for i, A in enumerate(AList):
        point += A * BList[i]
    if point > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N_M_C = [int(x.strip()) for x in input().split()]
B = [int(x.strip()) for x in input().split()]
A = []
for i in range(0, N_M_C [0]):
    A.append([int(x.strip()) for x in input().split()])
count = 0
for row_A in A:
    result = 0
    for i in range(0, len(B)):
        result += row_A[i]*B[i]
    if result > - N_M_C[2]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N, M, C = map(int, input().split())
B_list = list(map(int, input().split()))

number = 0
for i in range(N):
    source_list = list(map(int, input().split()))
    judge = 0
    for i in range(M):
        judge += source_list[i] * B_list[i]
    judge += C
    if judge > 0:
        number += 1
print(number)

Submission status: Accepted

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

list_b = []

list_a = []

while len(list_b) < M:
	list_b.extend(input().split())
	
	
for i in range(N):
	list_a_i = []
	while len(list_a_i)< M:
		list_a_i.extend(input().split())
		list_a.append(list_a_i)

count_right = 0


for i in range(N):
	sum_abc = 0
	for j in range(M):
		list_ai = list_a[i]
		sum_abc += int(list_ai[j])*int(list_b[j])
	
	if sum_abc > -C:
		count_right += 1
	else:
		continue
	

print(count_right)

Submission status: Accepted

Solution code:
import numpy as np

n, m, c = [int(x) for x in input().split(' ')]
b = np.asarray([int(x) for x in input().split(' ')])

a = np.ndarray((n, m), dtype=np.int32)
for i in range(n):
    a[i] = [int(x) for x in input().split(' ')]


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

Submission status: Accepted

Solution code:
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(' ')]
    ab = sum(x * y for (x, y) in zip(a, b))
    if ab + c > 0:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
NMC=list(map(int,input().split()))
B=list(map(int,input().split()))


count=0
for i in range(NMC[0]):
 A=list(map(int,input().split()))
 sum=0
 for j in range(NMC[1]):
  sum=sum+A[j]*B[j]
 if sum+NMC[2]>0:
  count=count+1

print(count)

Submission status: Accepted

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

print(sum([1 if sum([a * b for a, b in zip(AS, BS)]) + C > 0 else 0 for AS in ASS]))

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()))
	cal = c
	for x in range(m):
		cal += a[x] * b[x]
		if x == m - 1 and cal > 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()))
res = 0

for i in range(N):
    A = list(map(int,input().split()))
    tmp = C
    for i,j in zip(A,B): # longer is cut
        tmp += i * j
    if tmp > 0:
        res += 1

print(res)

Submission status: Accepted

Solution code:
from sys import stdin


def na():
    return map(int, stdin.readline().split())


n, _, c = na()
bs = tuple(na())

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
A = [[int(j) for j in input().split()] for i in range(N)] 
b = np.array(B)
cnt = 0
for i in range(N):
    if (np.dot(np.array(A[i]),b) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
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 = []
    for i in range(N):
        A.append(list(map(int, input().split())))

    A = np.array(A)

    print(len(np.where(A.dot(B) + C > 0)[0]))

Submission status: Accepted

Solution code:
import numpy as np


N, M, C = map(int, input().split())
B = np.fromiter(map(int, input().split()), dtype=int)
As = list()
for i in range(N):
    a = np.fromiter(map(int, input().split()), dtype=int)
    As.append(a)
As = np.vstack(As)
print(int(np.sum(As.dot(B) + C > 0)))

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    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 = c

        for j in range(m):
            total += a[j] * b[j]

        if total > 0:
            ans += 1

    print(ans)


if __name__ == '__main__':
    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)]
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
from itertools import izip

N, M, C = (int(x) for x in raw_input().split())
B = [int(x) for x in raw_input().split()]
A = [[int(x) for x in raw_input().split()] for i in xrange(N)]
result = 0
for i in xrange(N):
  cur_sum = C
  for a, b in izip(A[i], B):
    cur_sum += a * b
  if cur_sum > 0:
    result += 1
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in xrange(N):
	A = map(int, raw_input().split())
	A = [A[j] * B[j] for j in xrange(M)]
	if sum(A) + 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 = [[int(x) for x in input().split()] for i in range(N)]

count = 0
for i in range(N):
    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:
import numpy as np

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

ans = 0
for n in range(N):
    A = np.array(list(map(int, input().split())))
    if np.dot(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 = [list(map(int, input().split())) for _ in range(N)]

# 出力
ans = sum(1 for a in A if sum(x * y for x, y in zip(a, B)) + C > 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()))
  work = C
  for j in range(M):
    work += A[j] * B[j]
  if work > 0:
    ans += 1
    
print(ans)

Submission status: Accepted

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

print(counts)

Submission status: Accepted

Solution code:
from functools import reduce

def main():
	N,M,C = map(int,input().split())
	B = list(map(int,input().split()))
	mtr_A = []
	for i in range(N) :
		A = list(map(int,input().split()))
		mtr_A.append(A)
	collect = 0
	for A_gyo in mtr_A :
		polynomial = [ a*b for a,b in zip(A_gyo,B)]
		res = reduce(lambda x,y:x+y,polynomial) + C
		if res > 0 :
			collect += 1
	print(collect)

if __name__ == "__main__" :
	main()

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
for a in A:
    sum = 0
    for a_i, b_i in zip(a, B):
        sum += a_i * b_i
    sum += C
    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()))

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

Submission status: Accepted

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

def is_correct(As):
  return np.inner(As, Bs) + C > 0

As = list(map(int, input().split()))
n = 0
while As:
  if is_correct(As):
    n += 1
  try:
    As = list(map(int, input().split()))
  except:
    break
  
print(n)

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

Submission status: Accepted

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

# In[7]:


import numpy as np


# In[21]:


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


# In[22]:


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


# In[23]:


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


# In[ ]:

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 = list(map(int,input().split()))
    a.append(A)
ans = 0
for i in range(n):
    z = a[i]
    Z = 0
    for l in range(len(z)):
        Z += z[l] * b[l]
    if Z + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ファイルをオープンする
#test_data = open("test.txt", "r")

# 行ごとにすべて読み込んでリストデータにする
#line = test_data.readline()


#N, M, C = map(int, line.split())
N, M, C = map(int, input().split())
B = []
A = []

#line = test_data.readline()


#B = [int(b) for b in line.split()]
B = [int(b) for b in input().split()]
for i in range(N):
	A.append(list(map(int, input().split())))
	#line = test_data.readline()
	#A.append(list(map(int, line.split())))

sum = 0
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:
tmp = input()
N = int(tmp.split(' ')[0])
M = int(tmp.split(' ')[1])
C = int(tmp.split(' ')[2])
B = [int(b) for b in input().split(' ')]
cnt = 0
for i in range(N):
  A = [int(a) for a in input().split(' ')]
  sum = C
  for j in range(M):
    sum += B[j]*A[j]
  if sum > 0:
    cnt += 1
print(cnt)

Submission status: Accepted

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

accept=0

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

Submission status: Accepted

Solution code:
l_1 = list(map(int,input().split()))
l_2 = list(map(int,input().split()))
n = l_1[0]
m = l_1[1]
count = 0
s = l_1[2]
for i in range(n):
    l_3 = list(map(int,input().split()))
    for j in range(m):
        s += l_3[j]*l_2[j]
    if s>0:
        count+=1
    s=l_1[2]
print(count)

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 = []
count = 0

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

print(count)

Submission status: Accepted

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

count = 0 
for r in range(N):
    tmp = 0 
    for c in range(M):
        tmp += A[r][c] * b[c]
    tmp += C
    if tmp > 0: count += 1                                                                                     
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
data = input().split()

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

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

i = 0
j = 0
count = 0
while i < N:
    A = [int(k) for k in input().split()]
    
    sc = []
    while j < M:
        sc.append(A[j] * B[j])
        j += 1
        
    if sum(sc)+ C > 0:
        count += 1
    
    j = 0
    i += 1

print(count)

Submission status: Accepted

Solution code:
n,m,c =list(map(int,input().split()))
b=list(map(int,input().split()))
list_a=[list(map(int,input().split())) for i in range(n)]
cnt=0
for a in list_a:
    if sum([x * y for (x, y) in zip(a, b)])+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)])

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

Submission status: Accepted

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

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

print(sum([1 for a in A if np.dot(a, B) + C > 0]))

Submission status: Accepted

Solution code:
N,M,C=map(int,input().split())
Bs=[int(x) for x in input().split()]
Ans=0
for i in range(N):
    As=[int(x) for x in input().split()]
    D=0
    for j in range(M):
        Cs=As[j]*Bs[j]
        D=D+Cs
    if D+C>0:
        Ans=Ans+1

print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = np.array(list(map(int,input().split())))
ans = 0
for _ in range(N):
    A = np.array(list(map(int,input().split())))
    ans = ans + 1 if np.dot(A,B)+C>0 else ans
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):
    lst = list(map(int, input().split()))
    lb = 0
    for l,b in zip(lst,B):
        lb += l * b
    if lb + C > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
ans = 0
for i in range(n):
    count = c
    l = list(map(int,input().split(" ")))
    for j in range(m):
        count += ar[j] * l[j]
    if count > 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 = np.array([list(map(int, input().split())) for _ in range(n)])

print(((a * b).sum(axis=1) > -c).sum())