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

Submission status: Accepted

Solution code:
def main():
    n,m,c = tuple([int(t)for t in input().split()])
    b = tuple([int(t)for t in input().split()]) 
    ans = 0
    for _ in [0]*n:
      t = tuple([int(t)for t in input().split()])
      v = c
      for i in range(m):
        v+=b[i]*t[i]
      if v>0:
          ans+=1
    print(ans)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt = 0
for _ in range(N):
    A_list = np.array(list(map(int, input().split())))
    if sum(A_list * B_list) > -C:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = []
cnt = 0

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

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

res=0

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

Submission status: Accepted

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

def main():
    N, M, C = map(int, readline().rstrip().split())
    B = list(map(int, readline().rstrip().split()))
    ans = 0
    for _ in range(N):
        A = list(map(int, readline().rstrip().split()))
        if sum([a*b for a, b in zip(A, B)]) + C > 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()))
cnt = 0
for i in range(n):
    A_i = list(map(int, input().split()))
    chk = 0
    for j in range(m):
        chk += (A_i[j]*B[j])
    chk += c
    if chk > 0:
        cnt += 1
    else:
        pass
print(cnt)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline

def culc(A, B, C):
    ans = 0
    for i in range(len(B)):
        ans += A[i]*B[i]
    ans += C
    return ans

def main():
    N, M, C = map(int, readline().split())
    B = list(map(int, readline().split()))
    ans = 0
    for _ in range(N):
        A = list(map(int, readline().split()))
        ans += culc(A, B, C)>0
    print(ans)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = []
cnt = 0

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

Submission status: Accepted

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

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()))
  result = c
  for i in range(m):
    result += a[i] * b[i]
  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()))
A = [list(map(int, input().split())) for _ in range(N)]


count = 0
for i in A:
  t = C
  for a,b in zip(i, B):
      t += a * b
  if t > 0:
      count += 1
print(count)

Submission status: Accepted

Solution code:
n, m, c = list(map(int, input().split()))
b_list = list(map(int, input().split()))
a_lists = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for a_list in a_lists:

    v = c
    for i in range(len(a_list)):
        v += a_list[i] * b_list[i]

    if v > 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):
    s = 0
    a = list(map(int,input().split()))
    for i in range(m):
        s += a[i] * b[i]
    if s + c > 0:
        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 a in A:
        if sum(aa*bb for aa, bb in zip(a, B)) + C > 0:
            ans += 1
    return ans


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
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]]"
    print(solve(N, M, C, B, A))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    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 j in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

def test(l,c,m):
    case = list(map(int,input().split()))
    k = 0
    for i in range(m):
        k += l[i]*case[i]
    if k+c>0:
        return 1
    else:
        return 0
        
cnt = 0

for i in range(n):
    cnt += test(x,c,m)
    
print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
N, M ,C = map(int, input().split())
a = []
for i in range(N+1):
    a.append(list(map(int, input().split())))
all = np.array(a)
sum = 0
num = 0

for i in range(N):
    mul = np.sum(all[0] * all[i+1]) + C
    if mul > 0:
        num += 1
    mul = 0

print(num)

Submission status: Accepted

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

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

print(count)

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

Submission status: Accepted

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

    ans = 0
    for _ in range(n):
        a = [int(i) for i in input().split()]
        _ans = 0
        for _a, _b in zip(a, b):
            _ans += (_a * _b)
        if _ans + 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()))
cnt = 0
for _ in range(N):
  A = list(map(int,input().split()))
  if sum([a*b for a,b in zip(A,B)]) + C > 0:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
B=list(map(int,input().split()))
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 0<total:
        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)] 
    

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

Submission status: Accepted

Solution code:
def resolve():
  N, M, C = [int(i) for i in input().split()]
  B = [int(i) for i in input().split()]
  cnt = 0
  for i in range(N):
    A = list(int(item) for item in input().split())
    condition = sum([a*b for a, b in zip(A, B)]) + C
    if condition > 0:
      cnt += 1
  print(cnt)

resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
B =  [0]*M
A = [[0]*M]*N

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

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

cnt =0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))
##########
def main(n,m,c,a,b):
    res = 0
    for ai in a:
        if check(ai,b,c) : res += 1
    return res
    
def check(ai,b,c):
    temp = 0
    for i in range(m):
        temp += ai[i] * b[i]
    temp += c
    return temp > 0

n,m,c = mi()
b = mi()
a = mix(n)
print(main(n,m,c,a,b))

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split())
b = input().split()
a = [input().split() for i in range(N)]

b_arr = np.asarray(list(b), int)
a_arr = np.asarray(list(a), int)
counter = 0

for i in range(N):
    if np.sum(b_arr * a_arr[i]) > -C:
        counter += 1

print(counter)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(cnt)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = []
cnt = 0


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

Submission status: Accepted

Solution code:
# ABC121B

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 = np.array(a)
b = np.array(b)
print(sum(np.dot(a, b) +c > 0))

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([np.array(list(map(int, input().split()))) for _ in range(n)])

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

ans = 0

for i in range(N):
        test = C

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

        if test > 0:
            ans += 1

print(ans)

Submission status: Accepted

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

def check_score(N, C, B, A):
    correct = 0
    for A_i in A:
        score = sum([a*b for a, b in zip(A_i, B)]) + C
        if score > 0: correct += 1
    return correct

def main():
    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(check_score(N, C, B, A))

if __name__ == "__main__":
    try:
        assert check_score(2, -10, [1, 2, 3], [[3, 2, 1], [1, 2, 2]]) == 1
        assert check_score(5, -4, [-2, 5], [[100, 41], [100, 40], [-3, 0], [-6, -2], [18, -13]]) == 2
        assert check_score(3, 0, [100, -100, 0], [[0, 100, 100], [100, 100, 100], [-100, 100 ,100]]) == 0
    except:
        import traceback
        traceback.print_exc()
        exit()
    main()

Submission status: Accepted

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

print(
    len(
        [
            i
            for i in range(N)
            if sum([A[i][k]*B[k] for k in range(M)]+[C])>0
        ]
    )
)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
b_list = list(map(int,input().split()))
a_list = [list(map(int,input().split())) for nesya in range(n)]
ans = 0
for hoge in a_list:
  t = 0
  d = 0
  while t < m:
    d += b_list[t]*hoge[t]
    t += 1
  if d+c > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
Bs = list(map(int,input().split()))
As = []
ans = 0
for i in range(N):
    a = list(map(int,input().split()))
    As.append(a)
for i in range(N):
    sikinoatai = 0
    for j in range(M):
        sikinoatai +=  As[i][j] * Bs[j]
    sikinoatai += C
    if sikinoatai > 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):
	num = 0
	a = list(map(int,input().split()))
	for i in range(m):
		num += a[i] * b[i]
	if num + c > 0:
		ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = np.zeros((N,M), dtype=int)
for n in range(N):
    A[n,:] = list(map(int, input().split()))

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

print(cnt)

Submission status: Accepted

Solution code:
n, m, c = [int(x) for x in input().split()]
b_list = [int(x) for x in input().split()]
ans = 0
for _ in range(n):
    a_list = [int(x) for x in input().split()]
    temp = sum([a * b for a, b in zip(a_list, b_list)])
    if temp + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
for aa in a:
    tmp = c
    for i, j in zip(aa, b):
        tmp += i*j
    if tmp>0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m,c = map(lambda x:int(x),input().split())
b = list(map(lambda x:int(x),input().split()))
corrects = 0
for i in range(n):
  an = list(map(lambda x:int(x),input().split()))
  sum = c
  for j in range(m):
    sum += (an[j]*b[j])
  if sum>0:
    corrects += 1
print(corrects)

Submission status: Accepted

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

count = 0
for i in range(N):
    A = [int(_) for _ in input().split()]
    
    ev = 0
    for j in range(M):
        ev += A[j] * B[j]

    if ev + C > 0:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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([int(i) for i in input().split()])
ans=0
for a in A:
  asum=0
  for i in range(M):
    asum += a[i]*B[i]
  asum+=C
  if asum > 0:
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

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

Submission status: Accepted

Solution code:
N, M, C = [int(i) for i in input().split()]
b_list = [int(b) for b in input().split()]
a_lists = [[a for a in input().split()] for N in range(N)]

seikai = 0

for a_list in a_lists:
    m = 0
    siki = 0
    for a in a_list:
        siki += int(a) * b_list[m]
        m += 1
    if siki + C > 0:
        seikai += 1

print(seikai)

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

count = 0

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

print(count)

Submission status: Accepted

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

count = 0

for i in range(N):
  left = 0
  for j, a in enumerate(map(int, input().split())):
    left += a * B[j]
  if left + C > 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()))
    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 = [int(i) for i in input().split()]
x = 0
for i in range(n):
    a = [int(i) for i in input().split()]
    d = 0
    for j in range(m):
        d += b[j] * a[j]
    if d + c > 0:
        x += 1
print(x)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, M, C = mi()
B = li()

cnt = 0

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

Submission status: Accepted

Solution code:
# B - Can you solve this?

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
#from math import floor, ceil
#from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
#inf = 10**17
#mod = 10**9 + 7
n,m,c=MI()
B=LI()
ans=0
for i in range(n):
    A=LI()
    sm=c
    for j in range(m):
        sm+=A[j]*B[j]
    if sm>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)])

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

Submission status: Accepted

Solution code:
def can_you_solve_this(n, m, c, bl, al):

    ans = 0

    for i in al:
        count = 0
        for w in range(len(bl)):
            count += bl[w]*i[w]
        if count+c > 0:
            ans += 1

    return ans

def main():
    n, m, c = map(int, input().split())
    bl = list(map(int, input().split()))
    al = [list(map(int, input().split()))for i in range(n)]
    print(can_you_solve_this(n, m, c, bl, al))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
from collections import Counter
import itertools
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

n,m,c=MI()
b=LI()
A=LLI(n)

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