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:
#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from io import BytesIO


class dict(dict):
    """ dict() -> new empty dictionary """

    def items(self):
        """ D.items() -> a set-like object providing a view on D's items """
        return dict.iteritems(self)

    def keys(self):
        """ D.keys() -> a set-like object providing a view on D's keys """
        return dict.iterkeys(self)

    def values(self):
        """ D.values() -> an object providing a view on D's values """
        return dict.itervalues(self)


def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x


range = xrange

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

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')


def main():
    n, m, c = map(int, input().split())
    b = [int(bi) for bi in input().split()]

    res = 0
    for i in range(n):
        a = map(int, input().split())
        res += int(sum(ai * bi for ai, bi in zip(a, b)) + c > 0)

    print(res)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

B = list(map(int, input().split()))
for i in range(N):
    A = list(map(int, input().split()))
    
    total = sum([A[i]*B[i] for i in range(M)]) + C

    if total > 0:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
for _ in range(N):
    A = [int(i) for i in input().split()]
    su = C
    for ai, bi in zip(A, B):
        su += ai * bi
    if su > 0:
        count += 1

print(count)

Submission status: Accepted

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

res = 0
for i in range(n):
  a = [int(_) for _ in input().split()]
  if c + sum([j * k for j, k in zip(a, b)]) > 0:
    res += 1
print(res)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import operator
n, m, c = map(int, input().split())
cnt = 0
b = list(map(int, input().split()))
for _ in range(n):
    a = list(map(int, input().split()))
    cnt += (sum(map(operator.mul, a, b)) + c > 0)
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)]

cnt = 0
for i in range(N):
    t = C
    for j in range(M):
        t += a[i][j] * b[j]
    if t > 0:
        cnt += 1
print(cnt)

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

print(res)

Submission status: Accepted

Solution code:
N,M,C=[int(x) for x in input().split()]
Bs=[int(x) for x in input().split()]
r=0
for i in range(N):
    As=[int(x) for x in input().split()]
    total=0
    for j,a in enumerate(As):
        total+=a*Bs[j]
    if total+C>0:
        r+=1

print(r)

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

Submission status: Accepted

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

def ac(A):
    s=0
    for a,b in zip(A,B):
        s+=a*b
    return s+C>0

retval=0
for i in range(N):
    A=[int(i) for i in input().split(" ")]
    retval+=ac(A)

print(retval)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n, m, c = map(int,input().split())
B = list(map(int,input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from operator import mul

N, M, C = map(int, input().split())
Bs = list(map(int, input().split()))
Ass = [tuple(map(int, input().split())) for _ in range(N)]

ans = 0
for As in Ass:
    if sum(map(mul, As, Bs)) + C > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

result = 0

for row in A:
    t = C + sum([x * y for x, y in zip(row, B)])
    if t > 0:
        result += 1

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split())
B = np.array(list(map(int, input().split())))
ans = 0
for _ in range(n):
    A = np.array(list(map(int, input().split())))
    if np.dot(A, B)+c > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())

n, m, c = mi()
b = li()
ans = 0
for i in range(n):
    a = li()
    p = sum(x * y for x, y in zip(a, b))
    ans += p + c > 0
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 k in range(m):
        t += b[k]*a[k]
    if t+c>0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

print ans

Submission status: Accepted

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

"""
a, b, k = map(int, input().split())
a = list(map(int, input().split()))
for i in reversed(range(min(a, b)+ 1)):
"""

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()))
    sm = 0
    for j in range(m):
        sm += a[j]*b[j]
    if sm + 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 row in A:
    t = C
    for a,b in zip(row,B):
        t += a*b
    if t > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(Ans)

Submission status: Accepted

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

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

N, M, C = map(int, raw_input().split())
B = map(int, raw_input().split())

ans = 0
for _ in range(N):
    A = map(int, raw_input().split())
    S = C
    for i in range(M):
        S += A[i] * B[i]
    if S > 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()]
    tmp=C
    for j in range(M):
        tmp+=A[j]*B[j]
    if tmp>0:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
""" AtCoder """

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

n, m, c = map(int, input().split())
bbb = np.fromiter(map(int, input().split()), dtype=np.int64)
ans = 0
for _ in range(n):
    aaa = np.fromiter(map(int, input().split()), dtype=np.int64)
    if sum(aaa * bbb) + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

N,M,C=rl()
B=rl()
ans = 0
for _ in range(N):
    A=rl()
    if sum(map(lambda x,y:x*y,A,B))+C > 0:
        ans += 1
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A

#B
n,m,c = LI()
b = LI()
a = LIR(n)
ans = 0
for i in range(n):
    d = c
    for k in range(m):
        d += b[k]*a[i][k]
    if d > 0:
        ans += 1
print(ans)
#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Runtime Error

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[i]*B[i]
  if tmp + C > 0:
    ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for n in range(N):
  A[n] = list(map(int, input().split()))
  
  for i in range(M):
    _sum += A[n][i] * B[i]
    
  if _sum + C > 0:
    count += 1
  else:
    continue
    
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64)
ans = 0
for _ in range(N):
    A = np.array(inpl(), dtype=np.int64)
    ans += np.sum(A*B)+C > 0
print(ans)

Submission status: Runtime Error

Solution code:
3 3 0
100 -100 0
0 100 100
100 100 100
-100 100 100

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# その24
# ABC121 B - Can you solve this?

n,m,c=map(int,input().split())
B = np.array(list(map(int,input().split())))
K=[]
for i in range(n):
    A = list(map(int,input().split()))
    K.append(A)

import numpy as np
pp = np.array(K)
l = (pp*B).sum(axis=1)+c

t = 0
for i in range(len(l)):
    if l[i] > 0:
        t+=1
print(t)

Submission status: Runtime Error

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

print(cnt)

Submission status: Runtime Error

Solution code:
n,m,q = map(int, raw_input().split(' ')) #2 3 -10
bis = map(int, raw_input().split(' '))
c = 0
for _ in range(m):
	if sum([u*v for u,v in zip(map(int,raw_input().split(' ')),bis)]) + q > 0:
		c+=1
print c

Submission status: Runtime Error

Solution code:
n,m,q = map(int, raw_input().split(' ')) #2 3 -10
bis = map(int, raw_input().split(' '))
c = 0
for _ in range(m):
	if sum([u*v for u,v in zip(map(int,raw_input().split(' ')),bis)]) + q > 0:
      c+=1
print c

Submission status: Runtime Error

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: Runtime Error

Solution code:
#include<bits/stdc++.h>
// Begin Header {{{
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i,n) for(ll i=0; i<n; i++)
#define loop(i, j, n) for(ll i=j; i<n; i++)
#define all(x) (x).begin(), (x).end()
constexpr int INF  = 0x3f3f3f3f;
const long long mod=1e9+7;
const long double PI = acos(-1);
// }}} End Header

int main() {
	int n, m, c, ans =0;
	cin >> n >> m >> c;
	vector<int> b(m);
	rep(i,m) cin >> b[i];
	rep(i,n){
		int sum = 0;
		vector<int> a(m);
		rep(j,m){
			cin >> a[j];
			sum += a[j]*b[j];
		}
		sum+=c;
		if(sum > 0) ans++;
	}
	cout << ans << endl;
	return 0;
}

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
N, M, C = int(input())
B = list(map(int, inpot().split()))
count = 0
for j in range(N)
    A = list(map(int, input().split()))

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

print(count)

Submission status: Runtime Error

Solution code:
N, M, C = int(input())
B = list(map(int, inpot().split()))
count = 0
for j in range(N)
    A = list(map(int, input().split()))

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

print(count)

Submission status: Runtime Error

Solution code:
N, M, C = int(input())
B = list(map(int, inpot().split()))
count = 0
for j in range(N)
    A = list(map(int, input().split()))

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

print(count)

Submission status: Runtime Error

Solution code:
n,m,c = map(int,input().split())
ans = 0
for i in range(m):
    current = 0
    a = list(map(int,input().split()))
    for k,j in enumerate(a):
        current += j*(k+1)
    ans += 1 if c+current else 0
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pandas = "*"
numpy = "*"

[requires]
python_version = "3.7"

Submission status: Runtime Error

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=0c
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: Runtime Error

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(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)

Submission status: Runtime Error

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(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)

Submission status: Runtime Error

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(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if wa > 0 :
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
// #include <bits/stdc++.h>
#include <iostream>
#include <vector>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define repr(i,n) for (int i = 0; i < (f); --i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

const int MAX = 100;
const int INF = (1<<12);

int main() {
  int n, m, c;
  cin >> n >> m >> c;

  vector<int> B(n);
  rep(i,m) cin >> B[i];

  int ans = 0;
  rep(i,n){
    int sum = c;
    rep(j,m){
      int a;
      cin >> a;
      sum+= a * B[j];
    }
    if (sum > 0) ans++;
  }
  cout << ans << endl;
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 0

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

Submission status: Runtime Error

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 k in range(m):
    if a*b+c>0:
        ans += 1
    else:
        pas
print(ans)

Submission status: Runtime Error

Solution code:
H,W = [int(i) for i in input().split()]

h1 = H//2
h2 = H-h1

w2 = W//2
w1 = W-w2

if H==1 or W==1:
  print(1)
else:
  print(h2*w1+h1*w2)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(num)

Submission status: Runtime Error

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

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

print(num)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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