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:





# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

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

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []


###################################################################
from math import floor
def main():
    n,m,c=mi()
    B=li()
    ans=0
    for _ in range(n):
        A=li()
        s=0
        for i in range(m):
            s+=A[i]*B[i]
        s+=c
        if s>0:ans+=1
    print(ans)
    
    #ans=
    #sys.stdout.write(str(ans)+"\n")
    



""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
 
""" main function"""

if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

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

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

Submission status: Accepted

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

import numpy as np
import sys

read = sys.stdin.buffer.read

def main():
    n, m, c = map(int, input().split())
    l = list(map(int,input().split()))
    p = [list( map( int, input().split() ) ) for i in range(n)]
    
    count=0
    for sor in p:
        tmp=c
        for i, j in enumerate(sor):
            tmp=tmp+j*l[i]
        if tmp>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()))
a = []
count = 0
for _ in range(n):
    a = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

input_n = lambda: int(readline())
input_nn = lambda: map(int, readline().split())
input_s = lambda: readline().rstrip().decode('utf-8')
input_ss = lambda: readline().rstrip().decode('utf-8').split()
input_nl = lambda N: [list(map(int, readline().split())) for _ in range(N)]


def main():
    N, M, C = input_nn()
    B = np.array(list(input_nn()), np.int32)
    A = np.array(input_nl(N), np.int32)

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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 i in range(m):
        x += a[i] * b[i]
    ans += x + c > 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N, M, C, *_BA = map(int, open(0).read().split())
B = np.array(list(zip(*[map(int, iter(_BA))]*M))[0])
A = np.array(list(zip(*[map(int, iter(_BA))]*M))[1:])

print(sum(np.dot(A, B)+C > 0))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

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

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
def main():
    #CODE GOES HERE:
    n,m,c=mi()
    b=li()
    count=0
    for i in range(n):
        a=li()
        prodsum=sum([a[i]*b[i] for i in range(m)])+c
        if prodsum>0:
            count+=1
    print(count)















































""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
 
""" main function"""
 
if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

Solution code:
f=lambda:list(map(int,input().split()))
n,m,c=f()
b=f()
print(sum(sum(i*j for i,j in zip(f(),b))>-c for i in range(n)))

Submission status: Accepted

Solution code:
f=lambda:list(map(int,input().split()))
n,m,c=f()
b=f()
t=0
for i in range(n):
  a=f()
  if sum(i*j for i,j in zip(a,b))>-c: t+=1
print(t)

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

Submission status: Accepted

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

A = []

for i in range(N):
    A.append(list(map(int, input().split()))) 
    # a = list(map(int,input.split()))
sum = 0
count = 0
for i in range(N):
    for j in range(len(M)):
        sum += A[i][j] * M[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()))
calc = 0
ans = 0

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

    if calc + C > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def actual(n, m, C, B, A):
    cnt = 0

    for A_i in A:
        ab = sum([a * b for a, b in zip(A_i, B)])

        if ab + C > 0:
            cnt += 1

    return cnt

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(actual(N, M, C, B, A))

Submission status: Accepted

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

b = list(map(int, input().split()))
a_list = []
for i in range(n):
  a_list.append(list(map(int, input().split())))

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

Submission status: Accepted

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

alis = []
for _ in range(n):
    alis.append(list(map(int,input().split())))

total = c
cnt = 0
for i in range(n):
    for j in range(m):
        t = alis[i][j]*blis[j]
        total += t
        
    if total > 0:
        cnt += 1
    
    total = c

print(cnt)

Submission status: Accepted

Solution code:
import math
def ip():return int(input())
def inp():return map(int,input().split())
def inpstr():return map(str,input().split())
def linp():return list(map(int,input().split()))
def linpstr():return list(map(str,input().split()))

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

Submission status: Accepted

Solution code:
def resolve():
    N, M, C = list(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):
        total = 0
        for m in range(M):
            total += B[m]*A[i][m]
        if total + C > 0:
            cnt += 1
    print(cnt)

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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



for _ in range(N):
    A = np.array(list(map(int, input().split())))
    if sum(A * B.T) + 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()))

b = np.array(b)

count = 0
for _ in range(n):
    a = list(map(int, input().split()))
    a = np.array(a)

    if np.dot(a, b) + c > 0:
        count += 1
else:
    print(count)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int,input().split())
B = np.array([i for i in map(int,input().split())])
A = []
for n in range(N):
    A.append(np.array([i for i in map(int,input().split())]))

ans = 0

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b_lst = list(map(int, input().split()))
ans = 0
for _ in range(n):
    a_lst = list(map(int, input().split()))
    tmp = c
    for a, b in zip(a_lst, b_lst):
        tmp += a * b
    if tmp > 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 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:
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()))
  t = 0
  for d, e in zip(a, b):
    t += d * e
  t += c
  if t > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
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()))
    res=[a[i]*b[i] for i in range(m)]
    if sum(res)+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,tmp = list(map(int,input().split())),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
# B1 B2 ... BM
# A11 A12 ... A1M
# AN1 AN2 ... ANM
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
cnt = 0
s = 0

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

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
import numpy as np
b=np.array(input().split(),int)
ans=0
for _ in range(n):
  if np.dot(np.array(input().split(),int),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=[list(map(int,input().split())) for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Anser=0

for i in range(N):
    A=[]
    a=list(input().split())
    for _a in a:
        A.append(int(_a))
    temparr=[]
    for i in range(M):
        temparr.append(A[i]*B[i])
    if sum(temparr)+C>0:
        Anser+=1
print(Anser)

Submission status: Accepted

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