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:
# from math import factorial,sqrt,ceil
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"
n,m,c = map(int,input().split())
B = np.array(input().split(),dtype=np.int64)
times = n
table = []
for _ in range(times):
    table.append(list(map(int,input().split()))) # 行列の場合
A = np.array(table)

lis = np.dot(A,B) +c
anslis = np.bincount(lis > 0,minlength=2)
ans = anslis[1]

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

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

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

a = []
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
a,b,c= input().split()
x,y,z=(int(a),int(b),int(c))
B_list  = input().split()
count = 0
for j in range(x):
    A_list = input().split()
    sum_ans = 0
    for i in range(y):
        
        sum_ans +=  int(A_list[i]) * int(B_list[i])
    if sum_ans > -1 * z:
        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):
  D = 0
  for j in range(M):
    D += A[i][j] * B[j]
  D += C
  if D > 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=0
  for j in range(M):
    sum=sum+A[i][j]*B[j]
  sum=sum+C
  if sum>0:
    count=count+1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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]

    tmp += C

    if tmp > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))
import numpy as np
def main():
    N, M, C = input_nums()
    B = np.array(input_nums())
    cnt = 0
    for i in range(N):
        A = np.array(input_nums())
        if np.sum(A*B) + C > 0:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def dot(a, b, c):
  res = c
  for i in range(len(a)):
    res += a[i]*b[i]
  return res

counter = 0
for i in range(n):
  if dot(lista[i], listb, c) > 0:
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
B = [el for el in map(int,input().split())]
A = [[] for _ in range(N)]
for i in range(N):
    new = [el for el in map(int,input().split())]
    A[i] = new
ans = 0
for i in range(N):
    cand = 0
    for j in range(M):
        cand += A[i][j]*B[j]
    if cand + 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()))
  x = 0
  for j in range(m):
    x += b[j]*a[j]
  if x + c > 0:
    ans += 1

print(ans)

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
#template
from collections import Counter
def inputlist(): return [int(j) for j in input().split()]
#template
N,M,C = inputlist()
B = inputlist()
ans = 0
for i in range(N):
    A = inputlist()
    d =C
    for j in range(M):
        d += A[j]*B[j]
    if d > 0:
        ans +=1
print(ans)

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n,m,c = map(int,input().split())
  B = list(map(int,input().split()))
  cnt =0
  for i in range(n):
    ans = 0
    A = list(map(int,input().split()))
    for j in range(m):
      ans += B[j] * A[j]
    #-
    ans += c
    #-
    if ans > 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()))
A = [list(map(int, input().split())) for _ in range(N)]
a = 0
for i in range(N):
    b = 0
    for j in range(M):
        b = b + B[j]*A[i][j]
    if b > -C:
        a = a+1


print(a)

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    n,m,c = map(int, input().split())
    b = [int(i) for i in input().split()]

    count = 0
    for i in range(n):
        num=0
        a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,m,c = iim()
B = iil()
ans = 0
for i in range(n):
    A = iil()
    cond = c
    for x,y in zip(A,B):
        cond += x*y
    if cond > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
ans=0
for i in range(N):
  A=list(map(int,input().split()))
  d=0
  for j,k in zip(A,B):
    d+=j*k
  if d>-C:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())                                                                                                                         
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range(N):
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

Submission status: Accepted

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

b = 0
 
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
print(str(b))

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range(N):
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

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)]
total = 0
ans = 0

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

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 a in A:
    res = 0
    for i in zip(a,B):
        res += i[0] * i[1]
    res += C
    if(res > 0):
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def main():
  #n = int(input())
  #s = input()
  #s = input().split()
  n,m,c = list(map(int,input().split()))
  b = list(map(int,input().split()))
  #a = [input() for i in range(n)]
  #a = [int(input()) for i in range(n)]
  #a = [input().split() for i in range(n)]
  a = [list(map(int,input().split())) for i in range(n)]
  count = 0
  lis = []
  
  for i in range(n):
    ans = c
    for j in range(m):
      ans += a[i][j]*b[j]
    if ans > 0:
      count += 1
  print(count)
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 _ in range(n):
    a = map(int, input().split())
    if sum(i*j for i, j 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()))
 
S = [[0]*M for i in range(N)]
for i in range(N):
    S[i] = list(map(int, input().split()))
  
b = 0
  
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
print(str(b))

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, k) in zip(a, B):
        ans += j * k
    if ans + 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()))
    s=c
    for i in range(m):
        s+=a[i]*b[i]
    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()))
A=[]
for _ in range(N):
    A.append(list(map(int, input().split())))
#print(N,M,C,B,A)

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

Submission status: Accepted

Solution code:
def dot(vec1,vec2):
  res = 0
  for i in range(len(vec1)): res += vec1[i]*vec2[i]
  return res

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

Submission status: Accepted

Solution code:
n,m,c = (int(x) for x in input().split())
b = [int(i) for i in input().split()]
a = [0]*n
ans = 0
for i in range(n):
    a[i] = [int(i) for i in input().split()]

def check(a,b,c,m):
    value = c
    for j in range(m):
        value += a[j]*b[j]
    if value>0:
        return True
    else:
        return False

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

Submission status: Accepted

Solution code:
n,_,c=map(int,input().split());b=list(map(int,input().split()));print(sum(sum(i*j for i,j in zip(map(int,input().split()),b))+c>0 for _ in range(n)))

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split());b=list(map(int,input().split()));print(sum(sum(i*j for i,j in zip(map(int,input().split()),b))+c>0 for _ in range(n)))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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(i * j for i, j in zip(A, B)) + C > 0:
        ans += 1
print(ans)

Submission status: Accepted

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)]
tmp = []
cnt = 0

for i in range(N):
    tmp.append(np.dot(B, A[i]))

for i in range(N):
    if tmp[i]+C>0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[ list(map(int,input().split())) for _ in range(n)]
#print(a)
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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,m,c=INTM()
    b=LIST()
    ct=0
    for i in range(n):
        a=LIST()
        temp=0
        for k in range(m):
            temp+=b[k]*a[k]
        if temp+c>0:
            ct+=1
    print(ct)
if __name__ == '__main__':
    do()

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 sum(a*b)+c > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: map(int,input().rstrip().split()))
    input_number_list = (lambda: list(map(int, input_list())))

    N, M, C = input_number()
    B = input_number_list()
    A = [None] * N
    for i in range(N):
        A[i] = input_number_list()
    ans = 0
    for i in range(N):
        t = C
        for j in range(M):
            t += A[i][j] * B[j]
        ans += t > 0 and 1 or 0
    print(ans)


def resolve():
    main()


if __name__ == '__main__':
    resolve()

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)]
d = [sum(j*k for j, k in zip(i, b)) for i in a]
print(sum(1 for i in d if i + c > 0))

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
n,m,c=map(int,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(n,m,c)
#print(b)
#print(a)
#print("----------")
s=[]
for i in range(n):
    s.append(0)
    for j in range(m):
        s[i]+=a[i][j]*b[j]
        #print(s)
    s[i]+=c
#print(s)

count=0
for i in s:
    if i>0:
        count+=1
print(count)

Submission status: Accepted

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

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()))
    total = 0
    for i,j in zip(b,a):
        total += i*j
    total += c
    if total > 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()]
    c = sum([x*y for x, y in zip(A, B)]) + C
    if 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()))
    score = C
    for (ai, bi) in zip(A, B):
        score += ai * bi
    if score > 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):
    calc = C
    A = list(map(int, input().split()))
    for j in range(M):
        calc += A[j] * B[j]
    if calc > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:

def main():
    a, b, c = map(int, input().split())
    array = list(map(int, input().split()))
    
    # 多重リスト
    multi_list = [list(map(int, input().split())) for _ in range(a)]

    cnt = 0

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


    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n, m, c = MAP()
b = LIST()
ans = 0
for _ in range(n):
    a = LIST()
    tmp = c
    for i in range(m):
        tmp += a[i] * b[i]
    if tmp > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
n,m,c = map(int,input().split())
count = 0
t = np.zeros(n,dtype=int)
b = list(map(int,input().split()))
for i in range(n):
    a = list(map(int,input().split()))
    for j in range(m):
        t[i]+=a[j]*b[j]
    if t[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()))
ans = 0
for i in range(n):
    calc = c
    a = list(map(int, input().split()))
    for j in range(m):
        calc += a[j] * b[j]
    if calc > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
import os
from sys import stdin

# __dirname = os.path.dirname(__file__)
# __basename = os.path.splitext(os.path.basename(__file__))[0]
# __targetname = './input/' + __basename + '.txt'
# target_path = os.path.join(__dirname, __targetname)
# stdin = open(target_path)

def main():
    input_line = stdin.readline().rstrip().split(' ')
    N, M, C = map(int, input_line)
    B = list(map(int,stdin.readline().rstrip().split(' ')))
    A = [list(map(int,stdin.readline().rstrip().split(' '))) for _ in range(N)]
    ans = 0
    for i in range(N):
        a = sum([A[i][j]*B[j] for j in range(M)])
        a += C
        if(a>0):
            ans+=1

    # print(N,M,C)
    # print(B)
    # print(A)
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

for i in range(n):
    l = list_B[i]
    k = c
    for j in range(m):
        k += list_A[j]*l[j]
    if k > 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):
  sum = 0
  A = list(map(int,input().split()))
  for i in range(M):
    sum += A[i]*B[i]
  sum += C
  if sum > 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(" ")]
count = 0
for i in range(N):
    A = [int(k) for k in input().split(" ")]
    Sum = 0
    for j in range(M):
        Sum += A[j]*B[j]
    if Sum+C>0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
listed = list(map(int, input().split()))
cnt = 0
for i in range(a):
    lister=list(map(int, input().split()))
    combined1 = [x * y for (x, y) in zip(listed, lister)]
    if sum(combined1)+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 = [0]*N
ans = 0
for i in range(N):
    A[i] = list(map(int,(input().split())))
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 = [list(map(int,input().split())) for i in range(n)]
ans = 0
for i in range(n):
         judge = 0
         for j in range(m):
                  judge += a[i][j] * b[j]
         if judge + c > 0:
                  ans += 1
print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
a=tuple(map(int,input().split()))
b=[]
for i in range(a[0]+1):
    b.append(list(map(int,input().split())))
ans=0
s=0
for j in range(a[0]+1)[1:a[0]+1]:
    for k in range(a[1]):
        s+=b[j][k]*b[0][k]
    s+=a[2]
    if s>0:
        ans+=1
    s=0
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()))
    summention = sum(a*b for a, b in zip(A, B))
    if summention + 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=[]
for i in range(n):
    a1=list(map(int,input().split()))
    a.append(a1)

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

Submission status: Accepted

Solution code:
import numpy as np


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

    B_arr = np.array(B)
    ans = 0
    for A in As:
        A_arr = np.array(A)
        judge = np.sum((B_arr*A_arr)) + c
        if judge > 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

n, m, c = map(int, input().split())
b = np.array(input().split(), dtype=np.int32)
a = np.array([input().split() for _ in range(n)], dtype=np.int32)

wk = (a*b).sum(axis=1)+c
ans = len([p for p in wk if p > 0])
print(ans)