Problem:


Score : 200 points

Problem Statement

There are N pieces of source code. The characteristics of the i-th code is represented by M integers A_{i1}, A_{i2}, ..., A_{iM}.

Additionally, you are given integers B_1, B_2, ..., B_M and C.

The i-th code correctly solves this problem if and only if A_{i1} B_1 + A_{i2} B_2 + ... + A_{iM} B_M + C > 0.

Among the N codes, find the number of codes that correctly solve this problem.

Constraints

All values in input are integers.

1 \leq N, M \leq 20

-100 \leq A_{ij} \leq 100

-100 \leq B_i \leq 100

-100 \leq C \leq 100

Input

Input is given from Standard Input in the following format:

N M C
B_1 B_2 ... B_M
A_{11} A_{12} ... A_{1M}
A_{21} A_{22} ... A_{2M}
\vdots
A_{N1} A_{N2} ... A_{NM}

Output

Print the number of codes among the given N codes that correctly solve this problem.

Sample Input 1

2 3 -10
1 2 3
3 2 1
1 2 2

Sample Output 1

1

Only the second code correctly solves this problem, as follows:

Since 3 \times 1 + 2 \times 2 + 1 \times 3 + (-10) = 0 \leq 0, the first code does not solve this problem.

1 \times 1 + 2 \times 2 + 2 \times 3 + (-10) = 1 > 0, the second code solves this problem.

Sample Input 2

5 2 -4
-2 5
100 41
100 40
-3 0
-6 -2
18 -13

Sample Output 2

2

Sample Input 3

3 3 0
100 -100 0
0 100 100
100 100 100
-100 100 100

Sample Output 3

0

All of them are Wrong Answer. Except yours.



Sample input:
2 3 -10
1 2 3
3 2 1
1 2 2


Sample output:
1

Submission status: Accepted

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

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

a = []

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

for j in a:
    su = 0
    for k in range(m):
        su += j[k] * b[k]
    su += c
    if su > 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(0,n):
  a=list(map(int,input().split()))
  wa=c
  for(x,y)in zip(a,b):
    wa+=(x*y)
  if wa>0:
    ans+=1
    
print(ans)

Submission status: Accepted

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

A = [[0]*M]*N
for i in range(N):
  A[i] = list(map(int,input().split()))
  
def judge(a,b,c):
  sum = 0
  for i in range(len(a)):
    sum += a[i]*b[i]
  sum += c
  if sum > 0:
    return True
  else:
    return False

def solve(n,a,b,c):
  counter = 0
  for i in range(N):
    if judge(a[i],b,c):
      counter += 1
      
  return counter

print(solve(N,A,B,C))

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

print (ans)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
for i in range(n):
    sum = 0
    a = list(map(int, input().split()))
    for bi, ai in zip(b, a):
        sum += bi * ai
    sum += c
    if(sum > 0):
        count += 1
print(count)

Submission status: Accepted

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

ans = 0
for n in range(N):
  A_lis = list(map(int, input().split()))
  s = 0
  for a,b in zip(A_lis, B_lis):
    s += a*b
  s += C
  if s > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
from operator import mul

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())))
# print(B)
# print(A)
cnt = 0
for i in range(n):
    # print(A[i])
    AB = list(map(mul, A[i], B))
    # print(list(AB))
    if sum(AB) + c > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

import numpy as np

n, m, c = list(map(int, input().split()))
b = np.array(list(map(int, input().split())))


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

Submission status: Accepted

Solution code:
import sys
import numpy as np
N, M, C = map(int, sys.stdin.readline().rstrip().split())
B = np.array(list(map(int, sys.stdin.readline().rstrip().split())))
ans = 0
for _ in range(N):
    A = np.array(list(map(int, sys.stdin.readline().rstrip().split())))
    if np.dot(A, B) + C > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def is_correct(a, b, c, i):
    assert len(a) == N
    assert len(a[i]) == M
    return (sum([a[i][j] * b[j] for j in range(M)]) + c) > 0


if __name__ == "__main__":

    N, M, C = [int(x) for x in input().split(" ")]
    B = [int(x) for x in input().split(" ")]
    A = []
    for _ in range(N):
        A.append([int(x) for x in input().split(" ")])
    count = 0
    for i in range(N):
        if is_correct(A, B, C, i):
            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 _ in range(N):
    if sum([ai * bi for ai, bi in zip(map(int, input().split()), B)]) > -C:
        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):
  abc = 0
  for j in range(M):
    abc += A[i][j] * B[j]
  else:
    abc += C
    
  if abc > 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)]
answer = 0
for i in range(N):
    sum=0
    for j in range(M):
        sum = sum + A[i][j]*B[j]
    if sum + C > 0:
        answer = answer +1

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
nmc = list(map(int, input().split()))
b = list(map(int, input().split()))
a_st = [input().split() for i in range(nmc[0])]
a = [[int(item) for item in row] for row in a_st]
count = 0

for i in a:
    s = 0
    for index, value in enumerate(i):
        s += value * b[index]
    if s + nmc[2] > 0:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

r = 0
for a in a_l:
    if np.dot(a, b) + c > 0:
      r += 1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
(n, _, c), b, *a = [list(map(int, t.split())) for t in open(0)]
print(sum(-c<sum(j * k for j, k in zip(b, i)) for i in a))

Submission status: Accepted

Solution code:
(n, _, c),b, *a = [list(map(int, t.split())) for t in open(0)]
n = [1]*n
for h,i in enumerate(a):
    n[h] *= sum(j*k for j,k in zip(b, i)) + c > 0
print(sum(n))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

ans=0
for _ in range(n):
    total =c

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

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

    if total>0:
        ans+=1
    
print(ans)

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
B=[0]*M
tmp = input().split()
for m in range(M):
    B[m] = int(tmp[m])

cnt = 0
for n in range(N):
    tmp = input().split()
    point = 0
    for m in range(M):
        point += B[m]*int(tmp[m])
    point += C
    if point > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
il = [int(k) for k in input().split()]
B = [int(k) for k in input().split()]
N = il[0]
M = il[1]
C = il[2]
result = 0

for i in range(N):
    A = [int(k) for k in input().split()]
    tmp_list = [x * y for (x, y) in zip(A, B)]
    sum_tmp_list = sum(tmp_list)
    if sum_tmp_list + C > 0:
        result += 1

print(result)

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
y = list(map(int, input().split()))
z = [list(map(int, input().split())) for i in range(x[0])]
count = 0
for i in z:
  tmp = x[2]
  for j in range(0, x[1]):
    tmp += i[j]*y[j]
  if tmp > 0:
    count += 1
print(count)

Submission status: Accepted

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


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

B = li()

res = 0

for i in range(N):
    A = li()
    point = 0
    for j in range(M):
        point += A[j] * B[j]
    point += C

    if point > 0:
        res += 1

print(res)

Submission status: Accepted

Solution code:
def resolve():
    import numpy as np
    N, M, C = [int(i) for i in input().split()]
    B = [int(i) for i in input().split()]
    A = np.array([list(map(int, input().split())) for _ in range(N)])
    ans = 0
    for i in range(N):
        ans += 1 if sum(A[i] * B) + C > 0 else 0
    print(ans)


resolve()

Submission status: Accepted

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

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):
    result=0
    a=list(map(int,input().split()))
    for z in range(m):
        result+=b[z]*a[z]
    if (result+c)>0:
        count+=1
if count==0:
    print(0)
else:
    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())))
count=0
for i in range(n):
  a=np.array(list(map(int, input().split())))
  if sum(a*b)+c>0:
    count+=1

print(count)

Submission status: Accepted

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

count = 0
for _ in range(N):
    A = tuple(map(int, input().split(' ')))
    count += int(sum([a * b for a, b in zip(A, B)]) + C > 0)

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N,M,C = LI()
B = LI()
A = [list(map(int,input().split())) for i in range(N)]

ans = 0
for i in range(len(A)):
    temp = 0
    for q in range(len(A[i])):
        temp += B[q]*A[i][q]
        if q == len(A[i]) - 1:
            temp += C
            
            if temp > 0:
                ans += 1

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

n, m, c = [int(x) for x in stdin.readline().strip().split()]
# read B
b_lst = [int(x) for x in stdin.readline().strip().split()]
# read A and calc
cnt = 0
for _ in range(n):
  abc = sum([b_lst[i] * int(x) for i, x in enumerate(stdin.readline().strip().split())]) + c
  if(abc) > 0:
    cnt += 1
    
print(cnt)

Submission status: Accepted

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


def solve(N: int, M: int, C: int, B: "List[int]", A: "List[List[int]]"):

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


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    B = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    A = [
        [int(next(tokens)) for _ in range(M)] for _ in range(N)
    ]  # type: "List[List[int]]"
    solve(N, M, C, B, A)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    f12()

main()

Submission status: Accepted

Solution code:
#l = list(map(int,input().split()))

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())
apple = []
orange = list(map(int, input().split()))
for _ in range(n):
    apple.append(list(map(int, input().split())))
count = 0

def cat(b, a):
    d = 0
    for j in range(m):
        d += b[j] * a[j]
    return int(d + c)

for i in apple:
    if cat(orange, i) > 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()))
B = np.array(B)

get_count = 0
for i in range(N):
    A  = list(map(int, input().split()))
    A = np.array(A)
    if sum(A*B) + C >0:
        get_count += 1

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

ans = 0
count = 0
for i in range(n):
  for index in range(m):
    ans += a[i][index]*b[index]
  if ans + c > 0:
    count += 1
  else:
    next
  ans = 0
print(count)

Submission status: Accepted

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

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

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

print(success_source_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 Ai in A:
    ansi = C
    for i, a in enumerate(Ai):
        ansi += a * B[i]
    if ansi > 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()]
ans = 0
for _ in range(n):
    if sum([b[i] * int(x) for i, x in enumerate(input().split())]) + 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()))
  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()))
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())
B = list(map(int,input().split()))
li2=[input() for i in range(n)]
A = []
for i in range(n):
    A.append( [int(x.strip()) for x in li2[i].split()])

ans = 0

for i in range(n):
    var = c
    for j in range(m):
        var += A[i][j]*B[j]
    if var > 0:
       ans += 1
       
print(ans)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b = list(map(int , input().split()))
ans = 0
for _ in range(n):
    a = list(map(int , input().split()))
    tmp = c
    for i, ai in enumerate(a):
        tmp += ai * b[i]
    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()))

ans = 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:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
cou=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:
        cou+=1
print(cou)

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=C
    for j in range(M):
        total+=B[j]*A[j]
    if total>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=list(map(int,input().split()))
  A.append(a)

ans = 0
for n in range(N):
  score = 0
  a = A[n]
  for m in range(0,M):
    score += a[m] * B[m]
  if score + 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()))
  s = c
  for j in range(m):
    s += a[j]*b[j]
  if s >0:
    count += 1
print(count)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
lst = list(map(int, input().split()))
cnt = 0
for _ in range(x):
    lst_a = list(map(int, input().split()))
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
    if total > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
lst = list(map(int, input().split()))
cnt = 0
for _ in range(x):
    lst_a = list(map(int, input().split()))
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
    if total > 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 i in range(n):
    aa = list(map(int, input().split()))
    a.append(aa)

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

print(cnt)

Submission status: Accepted

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


def invr():
    return(map(int, input().split()))


n, m, c = invr()
B = inlt()
A = []
for t in range(n):
    A.append(inlt())
# print(A)
# print(B)

correct = 0
for i in range(n):
    s = 0
    for j in range(m):
        s += A[i][j]*B[j]
    s += c
    if s > 0:
        correct += 1
print(correct)

Submission status: Accepted

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n,m,c = readInts()
b = readInts()
a = []
for i in range(n):
	a.append(readInts())
ans = 0

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

print(ans)

Submission status: Accepted

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

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

rez = [0]*N

for i in range(M):
  for j in range(N):
    rez[j] += B[i]*A[j][i]

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
def resolve():
    count = 0
    li = np.array(list(map(int,input().split())))
    Barray = np.array(list(map(int,input().split())))
    for i in range(li[0]):
        Aarray = np.array(list(map(int,input().split())))
        if np.dot(Barray,Aarray) + li[2] > 0:
            count = count + 1
    print(count)        
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,c=map(int, input().split())
blist = list(map(int, input().split()))
s = 0
for n in range(N):
  l = []
  alist = list(map(int, input().split()))
  for m in range(M):
    l.append(blist[m] * alist[m])
  if sum(l) + c > 0:
    s += 1
print(s)