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: Wrong Answer

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 a in A:
    c = 0
    for j in range(len(a)):
        c += a[j]*B[j]
    if c-abs(C) > 0:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if n<1 or m<1:
    print("0")
    exit()

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

a=range(n)
a= [[0 for i in range(m)] for j in range(n)]
for N in range(n):
    a[N] = list(map(int,input().split()))

cou=0
cou2=0
for N in range(n):
    for M in range(m):
        cou=cou+int(a[N][M])*int(b[M])
    if cou+c>1:
        cou2=cou2+1


print(cou2)

Submission status: Wrong Answer

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

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

a=range(n)
a= [[0 for i in range(m)] for j in range(n)]
for N in range(n):
    a[N] = list(map(int,input().split()))

cou=0
cou2=0
for N in range(n):
    for M in range(m):
        cou=cou+int(a[N][M])*int(b[M])
    if cou+c>0:
        cou2=cou2+1


print(cou2)

Submission status: Wrong Answer

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

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

a=range(n)
a= [[0 for i in range(m)] for j in range(n)]
for N in range(n):
    a[N] = list(map(int,input().split()))

cou=0
cou2=0
for N in range(n):
    for M in range(m):
        cou=cou+int(a[N][M])*int(b[M])
    if cou+c>1:
        cou2=cou2+1


print(cou2)

Submission status: Wrong Answer

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

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

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

print(A)
cnt = 0
for a_list in A:
    sum = 0
    for a, b in zip(a_list, B):
        sum += a*b
    if sum + C > 0:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

res = 0
for p in a:
  if sum(i+j for i,j in zip(p,b)) + c > 0:
    res += 1
print(res)

Submission status: Wrong Answer

Solution code:
import numpy as np

N, M, C = map(int, input().split())
b_array = np.array([int(v) for v in input().split()]).reshape(1,-1)

a_array = np.array([int(v) for v in input().split()]).reshape(1, -1)
for n in range(N-1):
    a_add = np.array([int(v) for v in input().split()]).reshape(1, -1)
    a_array = np.concatenate((a_array, a_add), axis=0)
    
ab_array = (a_array * b_array).sum(axis=1) + C

print(np.sum(np.where(ab_array>0)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M,C = map(int,input().split())
b = list(map(int, input().split()))
a = []
for _ in range(N):
    l = list(map(int, input().split()))
    a.append(l)

#print(b)
#print(a)

c = 0
for i in range(N):
    g = 0
    for aa,bb in zip(a[i],b):
        g += aa*bb
    g += c
    if g > 0:
        c += 1
print(c//2)

Submission status: Wrong Answer

Solution code:
def main():
    N, M, C = map(int, input().split())
    B = list(input().split(' '))
    for i in range(M):
        B[i] = int(B[i])
    all_A = []
    clear_count = 0
    cal = 0
    for i in range(N):
        A = list(input().split(' '))
        for j in range(M):
            A[j] = int(A[j])
        all_A.append(A)
    for A in all_A:
        for i in range(M):
            cal += A[i] * B[i]
        cal += C
        if cal > 0:
            clear_count += 1

    print(clear_count)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

d = 0

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

print(ans.count(1))

Submission status: Wrong Answer

Solution code:
n,m,c = [int(i) for i in input().split()]
e = [[int(i) for i in input().split()] for i in range(1+n)]

count=0
for j in range(1,n+1):
  tmp=0
  for i in range(1,m):
    tmp+=e[j][i]*e[0][i]
  if tmp>c:
    count+=1
    
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

d = 0

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

print(ans.count(1))

Submission status: Wrong Answer

Solution code:
n,m,c = [int(i) for i in input().split()]
e = [[int(i) for i in input().split()] for i in range(1+n)]

count=0
tmp=0

for j in range(1,n+1):
  for i in range(1,m):
    tmp+=e[j][i]*e[0][i]
  if tmp>c:
    count+=1
    
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,m,c = [int(i) for i in input().split()]
e = [[int(i) for i in input().split()] for i in range(1+n)]

count=0
tmp=e[1][0]*e[0][0]

for j in range(2,n+1):
  for i in range(1,m):
    tmp+=e[j][i]*e[0][i]
  if tmp>c:
    count+=1
    
print(count)

Submission status: Wrong Answer

Solution code:
N, M, C = map(int, input().split())
 
B = list(map(int, input().split()))
 
ans = []
 
src = []
 
for i in range(N):
  src.append(list(map(int, input().split())))
  
for i in range(N):
  for n in range(M):
    d = int(src[i][n]*B[n] + C)
    if (d > 0):
      ans.append(1)

print(ans.count(1))

Submission status: Wrong Answer

Solution code:
N, M, C = list(map(int, input().split()))
b_li = list(map(int, input().split()))
ct = 0
for i in range(N):
    a_li = list(map(int, input().split()))
    total = 0
    for a,b in zip(a_li, b_li):
        total += a * b
    if total + C > 0:
        print(i)
        ct += 1

if ct == 0:
    print(0)

Submission status: Wrong Answer

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
hoge = [list(map(int, input().split())) for _ in range(N-1)]
C_m = [C for _ in range(M)]

out = []
res = 0
for i in range(N-1):
  for j in range(M):
    res += (hoge[i][j]* B[j])
  out.append((res+C) > 0)
  res = 0

print(sum(out))

Submission status: Wrong Answer

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

ans = 0

for A in Ali:
    sumNum = 0
    for num, a in enumerate(A):
        sumNum += a * Bli[num]
        
    print(sumNum)
    if sumNum + C > 0:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N, M, C = map(int, input().split())
 
B = list(map(int, input().split()))
 
ans = []
 
src = []
 
for i in range(N):
  src.append(list(map(int, input().split())))
  
  for n in range(M):
    d = src[i][n]*B[n] + C
    if (d > 0):
      ans.append(1)
 
print(ans.count(1))

Submission status: Wrong Answer

Solution code:
N,M,C = map(int,input().split())
b = list(map(int, input().split()))
a = []
for _ in range(N):
    l = list(map(int, input().split()))
    a.append(l)

print(b)
print(a)

c = 0
for i in range(N):
    g = 0
    for aa,bb in zip(a[i],b):
        g += aa*bb
    g += c
    if g > 0:
        c += 1
print(c//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

B = np.array(B)
A = np.array(A)
AB = A*B
ans = [np.sum(AB[i]) + C for i in range(N)]
ans = np.array(ans)
ans = np.sum(np.where(ans>0))

print(ans)
#print(B)
#print(A)
#print(B*A)

Submission status: Wrong Answer

Solution code:
from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
	if 0 < C + reduce(lambda acc, p: acc + p[0]*p[1], zip(map(int, input().split()), B), 0):
		count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M,C = map(int,input().split())
B_lst = map(int,input().split())
count=0
for _ in range(N):
	A_lst = map(int,input().split())
	ans = C
	for a,b in zip(A_lst,B_lst):
		ans += a*b
	if ans > 0:
		count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, M, C = [int(_) for _ in input().split()]
B = [int(_) for _ in input().split()]
A = [[int(_) for _ in input().split()] for _ in range(N)]
ans = 0
for i in range(N):
    correct = True
    for j in range(M):
        if B[j] != A[i][j]:
            correct = False
            break
    if correct:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A

#B
n,m,c = LI()
b = LI()
a = LIR(n)
ans = 0
for i in range(n):
    d = 0
    for k in range(m):
        d += b[k]*a[i][k]
    if d > 0:
        ans += 1
print(ans)
#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

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

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

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

    if sum + c > 0:
        ans += 1


print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

n, m, c = LI()
b = LI()
a = LIR(n)
ans = 0

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

Submission status: Accepted

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

code_count = 0
answer = 0

while N > code_count:
    A = list(map(int, input().split()))
    sum = C
    for i in range(M):
        sum += A[i] * B[i]
    if sum > 0:
        answer += 1
    code_count += 1

print(answer)

Submission status: Accepted

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

cnt=0
for _ in range(n):
    sum=c
    a=list(map(int,input().split()))
    for i in range(m):
        sum+=a[i]*b[i]

    if sum>0:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
from operator import mul
ans = 0

N, M, C = map(int, input().split())
X = [list(map(int, input().split())) for i in range(N + 1)]

for i in range(N):  
  num = list(map(mul, X[0],X[i+1]))
  add = sum(num) + C
  if add > 0:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
from typing import List


def judge(c: int, m: int, b: List[int], a: List[int]) -> bool:
    result = c
    for i in range(m):
        result += a[i] * b[i]

    return 0 < result


def answer(n: int, m: int, c: int, b: List[int], a: List[List[int]]) -> int:
    count = 0
    for i in range(n):
        if judge(c, m, b, a[i]):
            count += 1

    return count


def main():
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]

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


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

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

Submission status: Accepted

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

cnt = 0
for a in range(N):
    math_list = []
    for b in range(M):
        math_list.append(A[a][b] * B[b])
    if sum(math_list) + C > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
a = []
d = 0
for i in range(n):
    a.append(list(map(int, input().split())))
    combined1 = [x * y for (x, y) in zip(a[i], b)]
    if sum(combined1) + c > 0:
        d += 1

print(d)

Submission status: Accepted

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

def ans121(N:int, M:int, C:int, B:str, A:list):
    B=list(map(int,B.split()))
    judge_count=0
    for i in range(N):
        A_list=list(map(int,A[i].split()))#N回検証を繰り返す
        math_count=0
        for j in range(M):#リストの中の要素Mの数だけB[j]*A_list[j]を繰り返し足していく
           math_count+=B[j]*A_list[j]
        if math_count+C>0:
           judge_count+=1
    return judge_count

print(ans121(N,M,C,B,A))

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 = list(map(int, input().split()))
    tmp = sum([a_ * b_ for (a_, b_) in zip(a, b)]) + c
    if tmp > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
# ABC121
# B Can you solve this?
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
ANS = []
ct = 0
for i in range(N):
    for j in range(M):
        ans += A[i][j] * B[j]
        if j == M-1:
            ANS.append(ans)
            ans = 0
for x in ANS:
    if x + C > 0:
        ct += 1
print(ct)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]
ans = []
val = 0
for arr in a:
    for s in range(m):
        val += arr[s]*b[s]
        if s == m-1:
            ans.append(val)
            val = 0
ans = list(map(lambda x: x + c, ans))
print(sum(l > 0 for l in 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()))
    if sum([a[i] * b[i] for i in range(m)]) + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/local/bin/python3
# https://atcoder.jp/contests/abc121/tasks/abc121_b

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

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

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

print(cnt)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = []
ans = 0
e = 0
for i in range(a[0]):
  d = list(map(int,input().split()))
  c .append(d)
for i in c:
  for j in range(a[1]):
    e += b[j]*i[j]
    
  if e + a[2] > 0:
    ans += 1
  e = 0
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()))
    x=C
    for i in range(M):
        x+=A[i]*B[i]
    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()))
ans = 0

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

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 i in range(N):
        t = C
        for j in range(M):
            t += A[i][j] * B[j]
        if t > 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 = (int(i) for i in input().split())
list_b = [int(i) for i in input().split()]
list_a = [[int(i) for i in input().split()] for j in range(0, n)]
count = 0
tmp = 0
for i in range(0, n):
    for j in range(0, m):
        tmp += list_b[j] * list_a[i][j]
    tmp += c
    if tmp > 0: count += 1
    tmp = 0
print(count)

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

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

Submission status: Accepted

Solution code:

def check(B, C):
    A = list(map(int, input().split()))
    s = 0
    for i, a in enumerate(A):
        s += a * B[i]
    s += C
    if s > 0:
        return True
    else:
        return False


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

    ans = 0
    for _ in range(N):
        if check(B, C):
            ans += 1
    print(ans)
resolve()

Submission status: Accepted

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

b = [int(x) for x in input().split()]
ans = 0
for i in range(n):
    a = [int(x) for x in input().split()]
    cnt = c
    for aa, bb in zip(a, b):
        cnt += aa * bb
    if cnt > 0: ans += 1
print(ans)

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

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):
    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:
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]

cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))
  
n,m,c=input2()
B=input_array()
A=[input_array() for _ in range(n)]

count=0

for a in A:
	tmp=c
	for i in range(m):
		tmp+=a[i]*B[i]

	if tmp>0:
		count+=1
print(count)

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, m, c = Input()
    b = Input()
    a = [Input() for _ in range(n)]
    ans = 0
    for row in a:
        tmp = c
        for x, y in zip(row, b):
            tmp += x * y
        if tmp > 0:
            ans += 1
    print(ans)

main()

Submission status: Accepted

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

cnt=0
sum=0

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

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

Submission status: Accepted

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

result = []

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

print(sum(result))

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

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    n,m,c = map(int,input().split())
    base_data=[]
    source_codes=[]
    base_data=list(map(int,input().split()))
    source_codes=[list(map(int,input().split())) for _ in range(n)]
    ans=0
    cnt=0

    for i in range(n):
        for j in range(m):
            ans+=source_codes[i][j]*base_data[j]
        ans=ans+c
        if ans > 0:
            ans=0
            cnt+=1
        else:
            ans=0
            continue
    
    print(cnt)    
    
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 i in range(n):
    if sum([a[i][j]*b[j] for j in range(m)]) + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

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