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

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
Bs = list(map(int, input().split()))
num = 0
for i in range(N):
  As = list(map(int, input().split()))
  r = C
  for j in range(M):
    r += As[j]*Bs[j]
  if r > 0:
    num += 1
print(num)

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split())
b_row  = np.array(list(map(int, input().split())))
a_rows = np.array([list(map(int, input().split())) for i in range(n)])

# print(b_row)
# print(a_rows)

ans_count = 0
for a_row in a_rows:
    # リストの各要素の積の合計を求める
    if sum(a_row * b_row) + c > 0:
        ans_count += 1

print(ans_count)

Submission status: Accepted

Solution code:
import numpy as np

count = 0
N,M,C = [int(i) for i in input().split(" ")]
B = [int(i) for i in input().split()]
B = np.array(B)
A = [list(map(int, input().split())) for _ in range(N)]
A = np.array(A)
for a in A:
  if np.dot(a,B) + C > 0:
    count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
 
Tmp = []
Tmp = input().rstrip().split(' ')
 
nN = int(Tmp[0])
nM = int(Tmp[1])
nC = int(Tmp[2])
nAns = 0
ListA = [0 for i in range(nM)]
ListB = [0 for i in range(nM)]
Tmp = input().rstrip().split(' ')
for i in range(nM):
  ListB[i] = int(Tmp[i])
nAns = 0
 
for i in range(nN):
  Tmp = input().rstrip().split(' ')
  for j in range(nM):
    ListA[j] = int(Tmp[j])

    
#  nTmp = np.dot(ListA, ListB.T)
  nTmp = 0
  for j in range(nM):
    nTmp += ListA[j] * ListB[j]
  nTmp += nC
  if nTmp > 0:
    nAns += 1

print(nAns)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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(' ')))
    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 = list(map(int,input().split()))
count = 0
def ok(l):
    s = 0
    for i in range(m):
        s += b[i]*l[i]
    if s+c>0:
        return 1
    else:
        return 0
        
for i in range(n):
    a = list(map(int,input().split()))
    count += ok(a)
print(count)

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(j) for j in input().split()])
    if np.dot(A,B)+c > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
# ABC 121 B

from collections import deque

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
M = [list(map(int, input().split()))for _ in range(N)]
count = 0
for i in M:
    if np.dot(np.array(B),np.array(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()))
d = 0
for i in range(n):
    a = list(map(int,input().split()))
    e = []
    for j in range(m):
        e.append(a[j]*b[j])
    if sum(e)+c > 0:
        d += 1
print(d)

Submission status: Accepted

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


def get_num():
    return int(input())


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


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

n, m, c = get_numbers()
b = list(get_numbers())

ans = 0
for _ in range(n):
    a = list(get_numbers())
    res = c
    for i, j in zip(a, b):
        res += i * j
    if res > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

print(an)

Submission status: Accepted

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

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

Submission status: Accepted

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

right=0

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

print(right)

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0
count = 0

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

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str_in = input().split()
num = int(str_in[0])
m   = int(str_in[1])
c   = int(str_in[2])

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

A_list = np.zeros((N,M+1))
for i in range(N):
  A_list[i,:] = np.array(list(map(int,input().split()))+[1])

cnt=0
for i in range(N):
#  print(A_list[i,:]*B)
  if sum(A_list[i,:]*B)>0:
    cnt+=1
print(int(cnt))

Submission status: Accepted

Solution code:
#ABC 121, B - can you solve this
n, m, c = map(int, input().split(' '))
B = [int(el) for el in input().split(' ')]

A = [[int(el) for el in input().split(' ')] for i in range(n)]
count = 0
for i in range(n):
    total = c
    for a, b in zip(A[i],B):
        total += a*b
    if total > 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
I=lambda:map(int,input().split())
n,m,c=I();B=list(I());e=0
for t in range(n):
  d=0
  for a,b in zip(list(I()),B):d+=a*b
  e+=(d+c>0)
print(e)

Submission status: Accepted

Solution code:
I=lambda:map(int,input().split())
n,m,c=I()
b=list(I())
A=[list(I()) for _ in[0]*n]
e=0
for a in A:
  d=0
  for i,j in zip(b,a):
    d+=i*j
  e+=(d+c>0)
print(e)

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

Submission status: Accepted

Solution code:
"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    N,M,C = map(int, sys.stdin.readline().split())
    b= list(map(int, sys.stdin.readline().split()))
    a= [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]

    ans=0
    for i in range(N):
        l=[]
        for j in range(M):
            n = a[i][j]*b[j]
            l.append(n)
        s = sum(l)
        if s + C >0:
            ans += 1
    print(ans)

Submission status: Accepted

Solution code:
def main44():
    data1 = input().split()
    nmc = []
    for i in range(3):
        nmc.append(int(data1[i]))
    data2 = input().split()
    b = []
    for i in range(nmc[1]):
        b.append(int(data2[i]))
    a = []
    for i in range(nmc[0]):
        data3 = input().split()
        kari = []
        for j in range(nmc[1]):
            kari.append(int(data3[j]))
        a.append(kari)
    result = 0
    for i in range(nmc[0]):
        karinum = nmc[2]
        for j in range(nmc[1]):
            karinum = karinum + b[j] * a[i][j]
        if karinum > 0:
            result = result + 1
    print(result)

if __name__ == "__main__":
    main44()

Submission status: Accepted

Solution code:
n,m,p=map(int,input().split())
y=list(map(int,input().split()))
x=list(list(map(int,input().split())) for _ in range(n))

import numpy as np

cnt=0

for i in range(n):
	if np.dot(np.array(y),np.array(x[i]).T)+p>0:
		cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc121/tasks/abc121_b

inp_1 = input().split()
n = int(inp_1[0])
m = int(inp_1[1])
c = int(inp_1[2])


b = [int(i) for i in input().split()]

a_mat = []

for i in range(n):
    a_mat.append([int(a) for a in input().split()])

count = 0

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


print(count)

Submission status: Accepted

Solution code:
list = [int(i) for i in input().split(" ")]
n = list[0]
m = list[1]
c = list[2]
b_list = [int(i) for i in input().split(" ")]
count = 0
for i in range(n):
    a_list = [int(i) for i in input().split(" ")]
    total = 0
    for a,b in zip(a_list,b_list):
        total += a*b
    total += c
    if total > 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 _ in range(n):
    a=list(map(int,input().split()))
    d=sum(map(lambda a:a[0]*a[1], list(zip(a,b))))+c
    if d > 0:
        res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
B = list(map(int, input().split()))
A = [0] * n
for i in range(n):
    A[i] = list(map(int, input().split()))
ans = 0

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

print(ans)

Submission status: Accepted

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

ans = 0
for _ in range(N):
    A_arr = [int(x) for x in input().split()] + [1]
    t = 0
    for a,b in zip(A_arr, B_arr):
        t += a*b
    if t > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

print(sum(sum(a * b for a, b in zip(A, B)) + C > 0 for A in AA))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
def q48(n, m, c, b, a):
    return (np.count_nonzero(np.dot(a, b) + c > 0))

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

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

Submission status: Accepted

Solution code:
import numpy as np
def q48(n, m, c, b, a):
    correct = 0
    
    for s in a:
        if np.dot(s, b) + c > 0:
            correct += 1
    return correct
        

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

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

Submission status: Accepted

Solution code:
def solve():
    N,M,C = [int(s) for s in input().split() if s]
    B = [int(s) for s in input().split() if s]
    A = [[int(s) for s in input().split() if s] for _ in range(N)]
    count = sum(sum(a*b for a,b in zip(A[i],B)) + C > 0 for i in range(N))
    print(count)
    
solve()

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):
    if sum([A[i][j]*B[j] for j in range(m)]) > -c:
        cnt += 1
        
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

correct_answer = 0

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

print(correct_answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = 0
for _ in range(N):
    A = list(map(int, input().split()))

    wa = 0
    for i in range(M):
        wa += A[i] * B[i]

    if wa + C > 0:
        ans += 1

print(ans)

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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()))
    temp = 0
    for i in range(m):
        temp += a[i] * b[i]
    if temp + c > 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 i in range(n):
  a=[int(x) for x in input().split()]
  combined1 = [x * y for (x, y) in zip(a, b)]
  if sum(combined1) + 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()))

z = 0
for n in range(N):
    x = C
    A = list(map(int, input().split()))
    for a,b in zip(A,B):
        x += a*b

    if x>0 : z+=1

print(z)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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 = list(map(int,input().split()))

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

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

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

print(count)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
bn = list(map(int, input().split()))
cnt = 0
for _ in range(n):
  an = list(map(int, input().split()))
  val = sum([a * b for (a, b) in zip(an, bn)]) + c
  if val > 0:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
N,M,C=map(int,input().split())
B=np.array([int(x) for x in input().split()])
A=np.array([[int(x) for x in input().split()] for n in range(N)])
print(np.count_nonzero(np.dot(A,B)+C > 0))

Submission status: Accepted

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

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):
    b1 = list(map(int, input().split()))
    asum = c
    for j in range(m):
        asum += b[j] * b1[j]
    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()))
ans = 0
for i in range(n):
    a = list(map(int, input().split()))
    if sum([j * k for  j, k in zip(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 for i in range(n)]
sum = 0
count = 0
for i in range(n):
    a[i] = list(map(int,input().split()))
for i in range(n):
    for j in range(m):
        sum += a[i][j] * b[j]
    sum += c
    if sum > 0:
        count += 1
    sum = 0
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()))
    s = 0
    for ai, bi in zip(a, b):
        s += ai * bi
    s += c
    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()))
count = 0

for i in range(N):
    tmp = list(map(int,input().split()))
    sum = 0

    for j in range(M):
        sum += B[j]*tmp[j]
    
    if sum + C > 0:
        count += 1

print(count)

Submission status: Accepted

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