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:
def main():

    """ convenient functions
    # for i, a in enumerate(iterable)
    # q, mod = divmod(a, b)
    # divmod(x, y) returns the tuple (x//y, x%y)
    # Higher-order function: reduce(operator.mul, xyz_count, 1)
    # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
    """

    """convenient decorator
    # @functools.lru_cache():
    # to facilitate use of recursive function
        # ex:
        # from functools import lru_cache
        # import sys
        # sys.setrecursionlimit(10**9)
        # @lru_cache(maxsize=None)
        # def fib(n):
        #     if n < 2:
        #         return n
        #     return fib(n-1) + fib(n-2)
        # print(fib(1000))
    """
    
    # import numpy as np
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product # https://docs.python.org/ja/3/library/itertools.html
    # accumulate() returns iterator! to get list: list(accumulate())
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  # prime factor
        b, e = 2, 0  # base, exponent
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        # TODO: How should I do when n - r is negative?
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict # https://docs.python.org/ja/3/library/collections.html#collections.deque
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
    from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
    import operator
    from operator import itemgetter
    # ex1: List.sort(key=itemgetter(1))
    # ex2: sorted(tuples, key=itemgetter(1,2))
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd # Deprecated since version 3.5: Use math.gcd() instead.
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    # first create factorial_list
    # fac_list = mod_factorial_list(n)
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
    def modinv(a, p = MOD):
        # evaluate reciprocal using Fermat's little theorem:
        # a**(p-1) is identical to 1 (mod p) when a and p is coprime
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        # fac_list = modfactorial_list(100)
        # print(modcomb(100, 5, modfactorial_list(100)))
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    """ initialize variables and set inputs
    # initialize variables
        # to initialize list, use [0] * n
        # to initialize two dimentional array, use [[0] * N for _ in range(N)]
    # set inputs
        # open(0).read() is a convenient method:
        # ex) n, m, *x = map(int, open(0).read().split())
        #     min(x[::2]) - max(x[1::2])
        # ex2) *x, = map(int, open(0).read().split())
        #     don't forget to add comma after *x if only one variable is used
    # preprocessing
        # transpose = [x for x in zip(*data)]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
        # flat = [flatten for inner in data for flatten in inner]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [1, 2, 3, 4, 5, 6, 7, 8, 9]
    # calculate and output
        # output pattern
        # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6
    """

    # functions used
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    # single int: int(r())
    # single string: r()
    # single float: float(r())
    # line int: R()
    # line string: r().split()
    # line (str, int, int): [j if i == 0 else int(j) for i, j in enumerate(r().split())]
    # lines int: [R() for _ in range(n)]
    """

    if __name__ != '__main__':
        # for test
        sys.stdin = open('sample.txt')

    # ----------------------------------
    # main

    N, _, C = R()
    B = R()
    A = [R() for _ in range(N)]
    count = 0
    for a in A:
        Sum = 0
        for i, j in zip(a, B):
            Sum += i * j
        if Sum + C > 0:
            count += 1
    
    print(count)
        
    
    # end of main
    # ----------------------------------

    """memo: how to use defaultdict of list
    # initialize
    Dic = defaultdict(list)
    # append / extend
    Dic[x].append(y)
    # for
    for k, v in Dic.items():
    """

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(N, M, C, inputs1, inputs2):
    B = string_to_int(inputs1)
    A = list(map(lambda i: string_to_int(i), inputs2))

    num = 0
    for a in A:
        score = 0
        for i in range(0, M):
            score += a[i] * B[i]
        score += C

        if score > 0:
            num += 1

    return num


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    [N, M, C] = string_to_int(input())
    ret = solve(N, M, C, input(), inputs(N))
    print(ret)

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

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())  # スペース、改行、タブは引数に指定しなくても split する
BB = list(map(int, input().split()))

ans = 0
for i in range(N):
    AA = list(map(int, input().split()))
    _sum = 0
    for j in range(M):
        _sum += AA[j] * BB[j]
    _sum += C
    if _sum > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

# カウンタ
ans=0

for i in range(N):
  # 入力
  la=list(map(int,input().split()))

  sm=0
  for j in range(M):
    sm+=la[j]*lb[j]

  # 0より大きいかチェック
  if sm+C>0:
    ans+=1

# 出力
print(ans)

Submission status: Accepted

Solution code:
def main():
    N, M, C = list(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 a in A:
        result = sum([x * y for x, y in zip(a, B)]) + C
        if result > 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()))
cnt = 0
for i in range(0, N):
	A = list(map(int, input().split()))
	sum = C
	for j in range(0, M):
		sum += A[j]*B[j]
	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()))
A = [list(map(int, input().split())) for j in range(N)]

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

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

count=0
for i in range(n):
    score=0
    for j in range(m):
        score+=info[i][j]*b[j]
    if score+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 ai in a:
  s = sum([bi*aii for bi, aii in zip(b,ai)]) + c  
  if s > 0:
    count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
list_b = [int(x) for x in input().split()]
list_a = [[int(y) for y in input().split()] for z in range(n)]

cnt = 0

for i in range(n):
    sum = c
    for j in range(m):
        sum += list_a[i][j] * list_b[j]
    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()))
src_a = [0]*n
for i in range(n):
    src_a[i] = list(map(int, input().split()))

cnt=0
for a in src_a:
    sum=0
    for j in range(m):
        sum+=b[j]*a[j]
    if sum + 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 _ in range(N):
    line = map(int,input().split())
    s = 0
    for i, l in enumerate(line):
        s += B[i] * l
    if s + C > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = np.array(input().split(),dtype=np.int)
A = np.array([input().split() for _ in range(N)],dtype=np.int)
answer = (((A*B).sum(axis=1)+C)>0).sum()
print(answer)

Submission status: Accepted

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

for i in range(a[0]):
  d = 0
  e = list(map(int,input().split()))
  for j in range(a[1]):
    d+=b[j]*e[j]
  else:
    if d+a[2]>0:
      c+=1
else:
  print(c)

Submission status: Accepted

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

ans = 0
for i in range(n):
    cnt = c
    for j in range(m):
        cnt += b[j] * codes[i][j]

    if cnt > 0:
        ans += 1
    else:
        continue

print(ans)

Submission status: Accepted

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

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


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

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())
b = list(map(int, input().split()))
cnt = 0
for _ in range(N):
    a = list(map(int, input().rstrip().split()))
    if sum([ai*bi for ai,bi in zip(a,b)])+C > 0:
        cnt += 1
        
print(cnt)

Submission status: Accepted

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

import numpy as np

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

ans = sum((np.dot(A,B) + C) > 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 i in range(N)]

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

Submission status: Accepted

Solution code:
import numpy as np

n, m, c = map(int, input().split())
arr = list(map(int, input().split()))
mtr = []
for i in range(n):
    a = list(map(int, input().split()))
    mtr.append(a)

count = 0
for i in range(n):
    if np.dot(mtr[i], arr)+c > 0:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

a = [list(map(int, input().split())) for i in range(n)]

out = 0

for i in range(len(a)):
    x = 0
    for j in range(m):
        x += a[i][j] * b[j]
    if x + c > 0:
        out += 1

print(out)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split())
bs = np.array(list(map(int, input().split())))

ans = 0

for i in range(n):
  as_ = np.array(list(map(int, input().split())))
  if np.sum(as_*bs)+c > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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 t in a:
    Sum=0
    for i in range(m):
        Sum+=t[i]*b[i]
    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()))

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

print(cc)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N,M,C=map(int,input().split())
B=[int(i) for i in input().split()]
count=0
for i in range(N):
  a=[int(val) for val in input().split()]
  if np.dot(a,B)+C>0:
    count+=1
  else:
    pass
print(count)

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split()) # 横に2個
B = np.array(list(map(int, input().split()))) # 横に2個

c = 0
for i in range(N):
    Ai = np.array(list(map(int, input().split())))
    if Ai.dot(B) + C > 0:
        c += 1

print(c)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split(" "))
lis_b = np.array(input().split(" "), dtype=np.int)
num_correct = 0

for i in range(N):
  lis_a = np.array(input().split(" "), dtype=np.int)
  if ((lis_a * lis_b).sum() + C) > 0:
    num_correct += 1

print(num_correct)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
lst_b = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
    total = 0
    lst_a=[int(i) for i in input().split()]
    for j in range(m):
        total += lst_a[j]*lst_b[j]
    if total>-c:
        cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

count = 0
for n in range(N):
    f = sum([a * b for (a, b) in zip(A_nm[n], B_m)])
    if (f > -C):
        count += 1

print(count)

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

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

Submission status: Accepted

Solution code:
import numpy as np
n,m,c = map(int, input().split())
cond = list(map(int,input().split()))
char = []
for i in range(n):
    char.append(list(map(int, input().split())))
npcond = np.asarray(cond)
npchar = np.asarray(char)

npstat = npchar * npcond
npstat1 = np.sum(npstat, axis = 1) + c

print(np.count_nonzero(npstat1 > 0))

Submission status: Accepted

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

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 = int(sys.stdin.readline())
a, b = map(int, sys.stdin.readline().split())
c = list(map(int, sys.stdin.readline().split()))
s = [list(map(int,list(sys.stdin.readline()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

a = 100
b = 0.987654321
print('{0:06d}-{1:6f}'.format(a,b))  # 0埋め, 小数点出力桁指定時のときの出力
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()))
    correct = 0
    for _ in range(N):
        total = C
        for a, b in zip(list(map(int, sys.stdin.readline().split())), B):
            total += (a * b)
        if total > 0:
            correct += 1
    print(correct)

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split())
#listを作成
B = list(map(int, input().split()))
count = 0
#Aの値を受け取る
for i in range(n):
    a = list(map(int, input().split()))
    s = np.dot(a, B) + c
    if s > 0:
        count = count + 1
    else:
        pass

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = 0 
n,m,c = list(map(int,input().split()))
b_lis = list(map(int,input().split()))
for i in range(n):
    a_lis = list(map(int,input().split()))
    sums = 0
    for i in range(m):
        sums += b_lis[i]*a_lis[i]
    if sums + 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 = []
for _ in range(N):
    a = list(map(int, input().split()))
    A.append(a)

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

print(ans)

Submission status: Accepted

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

b_list_str = input().split()
b_list = [int(s) for s in b_list_str]

a_matrix_str = []
for i in range(n):
    a_list_str = input().split()
    a_matrix_str.append(a_list_str)

a_matrix = []

for i in range(n):
    a_matrix.append([int(s) for s in a_matrix_str[i]])

count_ans = 0
for i in range(n):
    if sum([a*b for a,b in zip(a_matrix[i], b_list)]) + c > 0:
        count_ans += 1

print(count_ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

N, M, C = [int(x) for x in stdin.readline().rstrip().split()]
A = []
B = []
B = [int(x) for x in stdin.readline().rstrip().split()]
for i in range(0, N):
    A.append([int(x) for x in stdin.readline().rstrip().split()])


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

Submission status: Accepted

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

cnt=0

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