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:
# B - Can you solve this?
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 = 0
    for j in range(M):
        tmp += A[i][j]*B[j]
    ans = ans+1 if tmp+C>0 else ans
print(ans)

Submission status: Accepted

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

    for i in range(m):
        sum_num += a_arr[i] * b_arr[i]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
n,m,c = map(int,input().split())
b_list = list(map(int,input().split()))
a_list =[]
for i in range(n):
    a_list.append(list(map(int,input().split())))

ret_num = 0
sum = 0

for N in range(n):
    sum = 0
    for M in range(m):
        sum += a_list[N][M] * b_list[M]
    if sum + c > 0:
        ret_num += 1

print(ret_num)

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()))
    s = c + sum([a*b for a, b in zip(A, B)])
    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()))

ans = 0
for i in range(n):
    A = list(map(int, input().split()))
    s = c
    for a, b in zip(A, B):  s += a*b
    if s > 0:  ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    n, m, c = map(int, input().split())
    b_list = list(map(int, input().split()))
    a_list = [list(map(int, input().split())) for _ in range(n)]
    cnt = 0

    for i in range(n):
        tmp_sum = 0
        for j in range(m):
            tmp_sum += a_list[i][j] * b_list[j]
        if tmp_sum + c > 0:
            cnt += 1

    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def a_x_b(ab):
  a, b = ab
  return a*b

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

Submission status: Accepted

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

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())))
           
count = 0
for i in range(N):
  if sum(list(map(lambda x,y: x*y, A[i], B)))+C > 0:
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

n, m, c = map(int, input().split())
total = 0
count = 0
b_point = input().split()
b_table = [int(k) for k in b_point]
for i in range(n):
    total = 0
    a_point = input().split(" ")
    a_table = [int(m) for m in a_point]
    for j in range(m):
        total += b_table[j] * a_table[j]
        if j == m - 1:
            total += c
            if total > 0:
                count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

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

print(sum([1 for A in ALines if sum([a*b for a,b in zip(list(map(int, A.split())),B)]) + c > 0]))

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

Submission status: Accepted

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

count = 0
for i in range(n):
    score = 0
    for j in range(m):
        score += a[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 i in range(n)]
d = -1000
x = 0
for i in range(n):
    d = 0
    for j in range(m):
        d += a[i][j]*b[j]
    if d+c>0:
        x+=1
print(x)

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

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

i = 0
for a in A:
  s = 0
  for x, y in zip(a, B):
    s += int(x) * y

  if s + C > 0:
    i += 1
  else:
    pass


print(i)

Submission status: Accepted

Solution code:
a = input("").split(" ")
a = [int(aa) for aa in a]
b = input("").split(" ")
b = [int(bb) for bb in b]
Al = []
N = a[0]
C = a[2]
ans = 0
for aaa in range(N):
    al = input("").split(" ")
    al = [int(aal) for aal in al]
    Al.append(al)
for c in Al:
    n = 0
    i = 0
    for d in c:
        n += d*b[i]
        i += 1
    if n+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()))
  p = C
  for j in range(M):
    p += a[j] * B[j]
  if p > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
b = [int(x.strip()) for x in input().split()]
a = []
ans = 0
for i in range(n):
  ai = [int(x.strip()) for x in input().split()]
  a.append(ai)
for j in range(n):
  ch = [x*y for (x,y) in zip(a[j],b)]
  ch_sum = sum(ch)
  if ch_sum + c > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
n = l[0]
m = l[1]
c = l[2]

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

num_correct = 0

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

print(num_correct)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
base = list(map(int,input().split()))
x=[list(map(int, input().split())) for i in range(n)]
ans=0
cnt=0
for i in range(n):
    cnt=0
    for k in range(m):
        cnt+=base[k]*x[i][k]
    cnt+=c
    if cnt>0:
        ans+=1
    #←これがないとWAになるにゃ
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""Boot-camp-for-Beginners_Easy005_B_Can-you-solve-this_25-August-2020.py"""

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = list(list(map(int, input().split())) for i in range(N))

count=0
for i in range(N):
    s=0
    for j in range(len(B)):
        s+=B[j]*A[i][j]
    if s+C>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()))
    ab = [x*y for x,y in zip(a,b)]
    if sum(ab) + c > 0:
        cnt += 1
        
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())))
sum = 0
for _ in range(N):
    A=np.array(list(map(int,input().split())))
    if np.sum(A*B) + C > 0:
        sum += 1

print(sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
Bls = list(map(int,input().split()))
ii = 0
for i in range(N):
    sum1 = 0
    Als = list(map(int,input().split()))
    for j in range(M):
        sum1 += Bls[j]*Als[j]
    if sum1 + C > 0:
        ii += 1
print(ii)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ac = 0

for _ in range(n):
	res = c
	a = list(map(int, input().split()))
	for x, y in zip(a, b):
		res += x * y
	
	if res > 0:
		ac += 1

print(ac)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n,m,c = LI()
    b = LI()
    ans = 0
    for _ in range(n):
        a = LI()
        cul = 0
        for x, y in zip(a,b):
            cul += x*y
        cul += c
        ans += 1 if cul > 0 else 0
    
    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, m, c = LI()
b = LI()
a = LIR(n)
cnt = 0
for i in range(n):
    sahen = 0
    sahen += c
    for j in range(m):
        sahen += a[i][j] * b[j]
    if sahen > 0:
        cnt += 1
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())))
A = np.array([tuple(map(int, input().split())) for _ in range(N)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#5B-can you solve this
N, M, C = map(int, input().split())
listB = list(map(int, input().split()))
cnt = 0

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

print (cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n,m,c=nii()
b=lnii()

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

print(cnt)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
def inpl(): return list(map(int, input().split()))
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: 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()))
    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

def solve():
    input = sys.stdin.readline
    N, M, C = map(int, input().split())
    B = [int(b) for b in input().split()]
    count = 0
    for i in range(N):
        A = [int(a) for a in input().split()]
        point = C
        for i, a in enumerate(A):
            point += a * B[i]
        if point > 0: count += 1
    print(count)

    return 0

if __name__ == "__main__":
    solve()

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()))
  buf = C
  for i in range(M):
    buf += A[i]*B[i]
  if buf > 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):
    S = C
    for i, a in enumerate(map(int, input().split())):
        S += a*B[i]
    if S>0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M, C = mapint()
Bs = list(mapint())
ans = 0
for _ in range(N):
    p = [a*b for a, b in zip(mapint(), Bs)]
    if sum(p)+C>0:
        ans += 1
print(ans)

Submission status: Accepted

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

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N, M, C = map(int, sys.stdin.readline().split())
B = list(map(int, sys.stdin.readline().split()))

ans = 0
for _ in range(N):
    A = list(map(int, sys.stdin.readline().split()))
    tmp = 0
    for a, b in zip(A, B):
        tmp += a*b
    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()))
ans=0
for _ in range(N):
    A = list(map(int, input().split()))
    hantei=0
    for j in range(M):
        hantei+=A[j]*B[j]
    if hantei+C>0:
        ans+=1
print(ans)

Submission status: Accepted

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

count = 0
for _ in range(N):
    A = list([int(x) for x in input().split()])

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

    if solve > 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 a in A:
    if sum([x*y for (x,y) in zip(a,b)])+c > 0: ans += 1
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

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

result = (arr * b).sum(axis=1) + c
print(np.where(result > 0)[0].shape[0])

Submission status: Accepted

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

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

ans = 0

for _ in range(N):
    tmp_math = D
    A = list(map(int,input().split()))
    for i in range(M):
        tmp_math += B[i]*A[i]
    if tmp_math > 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()))
  temp = C
  for j in range(M):
    temp += A[j]*B[j]
  if temp > 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)]
cnt = 0
for i in range(N):
    tot = 0
    for j in range(M):
        tot += A[i][j]*B[j]
    if tot+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):
    A = list(map(int, input().split()))
    res = C
    for i in range(M):
        res += A[i]*B[i]

    if res > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

ans = 0
for _ in range(n):
    al = list(map(int, input().split()))
    v = 0
    for a,b in zip(al,bl):
        v += a*b
    v+=c
    if v > 0: ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, M, C = map(int, readline().split())
    B = list(map(int, readline().split()))
    A = [list(map(int, readline().split())) for _ in range(N)]

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

    print(ans)
    return


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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m,c = map(int, input().split())
brr = list(map(int, input().split()))
ans = 0
for i in range(n):
    s = 0
    arr = list(map(int, input().split()))
    for x,y in zip(arr, brr):
        s += x*y
    s += c
    if s > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
cnt = 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:
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b_lists = list(map(int, input().split()))
a_lists = []
for _ in range(n):
    tmp = list(map(int, input().split()))
    a_lists.append(tmp)

ans = 0
for i in a_lists:
    cond = c
    for j in range(m):
        cond += i[j]*b_lists[j]
    if cond > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

  counter = 0
  for _ in range(N):
    A = [int(x) for x in input().split(" ")]
    sum_of_a_x_b = 0
    for a, b in zip(A,B):
      sum_of_a_x_b += a * b
    if sum_of_a_x_b + C > 0:
      counter += 1
  print(counter)

if __name__ == "__main__":
  resolve()

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())))
D=[]
for i in range(N):
    D.append(0)
for i in range(N):
    for j in range(M):
        D[i]+=A[i][j]*B[j]
    D[i]+=C
e=0
for i in range(len(D)):
    if D[i]>0:
        e+=1
print(e)

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)