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:
x,y,z = map(int,input().split())

ans=0
first = list(map(int,input().split()))
for i in range(x):
    num=0
    A= list(map(int,input().split()))
    for t in range(y):
        num=num + int(A[t])*int(first[t])
    if (num+z)>0:
        ans=ans+1
    else:
        ans = ans
    #print('num',num+z)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
N = i[0]
M = i[1]
C = i[2]
B = list(map(int, input().split()))

A = [list(map(int, input().split())) for l in range(N)]
sum = 0
tom = 0
count = 0

for i in range(N):
  for j in range(M):
    sum = sum + (A[i][j] * B[j])
    if j == (M - 1):
      tom = sum + C
      if tom > 0:
        count = count + 1
        sum = 0
      else:
        sum = 0

print(count)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
rr = lambda: input().strip()
rrm = lambda: list(map(int, rr().split()))

N, M, C = rrm()
B = rrm()
ans = 0
for _ in range(N):
    A = rrm()
    if sum(a*b for a,b in zip(A,B)) + C > 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 = []
for i in range(N):
    A_p = list(map(int,input().split()))
    A.append(A_p)
cnt = 0
for A_q in A:
    siki = C
    for i in range(M):
        siki += A_q[i]*B[i] 
    if siki > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import numpy as np

N,M,C=map(int, input().split())
B_lst=list(map(int, input().split()))
A_lst=[]
for _ in range(N):
    A_lst.append(list(map(int, input().split())))

A=np.array(A_lst)
B=np.array(B_lst)

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

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

Submission status: Accepted

Solution code:
n,m,c = [int(i) for i in input().split()]
e = [[int(i) for i in input().split()] for i in range(1+n)]

count=0
for j in range(1,n+1):
  tmp=0
  for i in range(0,m):
    tmp+=e[j][i]*e[0][i]
#  print(tmp)
  if tmp+c>0:
    count+=1
    
print(count)

Submission status: Accepted

Solution code:
N, M, C = map(int, raw_input().split())
B = map(int, raw_input().split())
count = 0
for i in xrange(N):
    A = map(int, raw_input().split())
    val = C
    for idx in xrange(M):
        val += A[idx]*B[idx]
    if val > 0: count += 1

print count

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split())
B_list = list(map(int, input().split())) 
A_list = [list(map(int, input().split())) for i in range(N)]

cnt = 0
for i in range(N):
    judge = sum(np.array(B_list) * np.array(A_list[i])) + C
    if judge > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

A = []
for _ in range(N):
    temp = list(map(int, input().split()))
    A.append(temp)

cnt = 0
for a_list in A:
    sum = 0
    for a, b in zip(a_list, B):
        sum += a*b
    if sum + C > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split())
b_array = np.array([int(v) for v in input().split()]).reshape(1,-1)

a_array = np.array([int(v) for v in input().split()]).reshape(1, -1)
for n in range(N-1):
    a_add = np.array([int(v) for v in input().split()]).reshape(1, -1)
    a_array = np.concatenate((a_array, a_add), axis=0)
    
ab_array = (a_array * b_array).sum(axis=1) + C

print(np.sum(ab_array>0))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inData = input().split(' ')
N = int(inData[0])
M = int(inData[1])
ZERO = 0
seisuC = int(inData[2])
seisuB = input().split(' ')
ansCnt = 0
for i in range(0, N):
    inData2 = input().split(' ')
    calc = 0
    for j in range(0, len(inData2)):
        calc += (int(inData2[j]) * int(seisuB[j]))
    calc += seisuC
    if calc > ZERO:
        ansCnt += 1

print(ansCnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
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 = reduce(lambda x,y:x+y,[ a*b for a,b in zip(A,B) ]) + C 
    if s > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

for i in range(N):
    a=0
    for j in range(M):
        a+=A[i][j]*B[j]
    if a+C>0:
        ct+=1
    else:
        pass
print(ct)

Submission status: Accepted

Solution code:
def f(a, b):
    ret = 0
    for i in range(len(a)):
        ret += a[i]*b[i]
    return ret
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
print(len(list(filter(lambda x : f(x, b)+c>0, [list(map(int, input().split())) for i in range(n)]))))

Submission status: Accepted

Solution code:
import numpy as np

#N,M,Cの入力
N, M, C = map(int, input().split())

#Bの入力
B = [int(x) for x in input().split()]
B = np.array(B)

#Aの入力
A = []
for n in range(N):
  A.append([int(x) for x in input().split()])
A = np.array(A)

#行列計算
D = np.dot(A,B)+C

#判定
n = 0
for d in D:
  if d>0:
    n += 1
print(n)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import numpy as np
N, M, C = (int(i) for i in input().split()) 
B = np.array([[int(i) for i in input().split()] for i in range(1)][0])
e = np.array([[int(i) for i in input().split()] for i in range(N)])
# print(B)
# print(e)
# print(((np.sum(e*B, axis=1)+C)))
c_2 = np.count_nonzero((np.sum(e*B, axis=1)+C)>=1)
print(c_2)

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

res = 0
for p in a:
  if sum(i*j for i,j in zip(p,b)) + c > 0:
    res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0

for i in range(N):
  A = [int(i) for i in input().split()]
  index = 0
  for j in range(M):
    index += A[j]*B[j]
  if index + C > 0:
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 26 17:52:43 2019

@author: nakamuratakayuki
"""

N, M, C = tuple(map(int, input().split()))
B_list = list(map(int, input().split()))
B_list.insert(0, 0)
A_list = [0]
for i in range(N):
    A_list.append(list(map(int, input().split())))
c = 0

for i in range(1,N+1):
    d = 0
    for j in range(1,M+1):
        d += A_list[i][j-1]*B_list[j]
    d += C
    if 0 < d:
        c += 1

print(c)

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
b_list = list(map(int,input().split()))
a_list = []
d_list = []
for i in range(n):
    d_list = list(map(int,input().split()))
    a_list.append(d_list)

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

print(ans_count)

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
B = list(map(int, input().split()))
A =[list(map(int,input().split())) for i in range(N[0])]
counter=0
amount=0
for i in range(N[0]):  #ソースコードの数
    for j in range(N[1]):  #Bの変数の数
        amount += A[i][j]*B[j]
    if (amount + N[2])>0:
        counter += 1
    amount = 0

print(counter)

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

Submission status: Accepted

Solution code:

def B():
    NMC = input().split()
    N = int(NMC[0])
    M = int(NMC[1])
    C = int(NMC[2])
    B = [int(i) for i in input().split()]
    A = []
    for i in range(N):
        A.append([int(a) for a in input().split()])

    acc = 0
    for i in range(N):
        clear = False
        eq = 0

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

    print (acc)

if __name__ == '__main__':
    #A()
    B()

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
Bs = list(map(int, input().split()))
ans = 0
for n in range(N):
  As = list(map(int, input().split()))
  score = C
  for a, b in zip(As, Bs):
    score += a * b
  ans += score > 0
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp=list(map(int,input().split()))
b=list(map(int,input().split()))
n=inp[0]
m=inp[1]
c=inp[2]
wa=0
seikai=0
for i in range(n):
  retu= list(map(int,input().split()))
  for j in range(m):
    kake=retu[j]*b[j]
    wa=wa+kake
  if wa+c>0:
    seikai=seikai+1
  wa=0
print(seikai)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(list(filter(lambda n: sum([A[n][m] * B[m] for m in range(M)]) + C > 0, range(N)))))

Submission status: Accepted

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

#print(b)
#print(a)

c = 0
for i in range(N):
    g = 0
    for aa,bb in zip(a[i],b):
        g += aa*bb
    g += C
    #print('g:',g)
    if g > 0:
        c += 1
print(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from operator import mul
 
N,M,C = sys.stdin.readline().strip().split()
N = int(N)
M = int(M)
C = int(C)
 
B_list = sys.stdin.readline().strip().split()


for i in range(len(B_list)):
    B_list[i] = int(B_list[i])

#print(B_list)

A_list = []
for i in range(N):
    tmp = sys.stdin.readline().strip().split()
    A_list.append(tmp)

for i in range(len(A_list)):
    for j in range(len(A_list[i])):
        A_list[i][j] = int(A_list[i][j])

#print(A_list)

cnt = 0
for k in range(N):
    combined = [A * B for (A, B) in zip(A_list[k], B_list)]
    calc = sum(combined) + C
    if(calc>0):
        cnt += 1

print(cnt)
#combined = map(mul, A_list, B_list)
#print(combined)

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

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[map(int,input().split()) for _ in range(n)]
ans=0
for x in a:
  ans+=(1 if sum(map(lambda y,z:y*z,x,b))>-c else 0)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

N, M, C = (int(i) for i in input().split())
e = [[int(i) for i in input().split()] for i in range(N+1)]

B = np.array(e[0])
A = np.array(e[1:])


print(((np.sum(B*A, axis=1)+C)>0).sum())

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split(' '))
B = []
for b in input().split(' '):
  B.append(int(b))
A = []
for n in range(N):
  A_n = []
  for a in input().split(' '):
    A_n.append(int(a))
  A.append(A_n)
 
# search answer
ans = 0
for A_i in A:
  eq = 0
  for m in range(M):
    eq += A_i[m]*B[m]
  eq += C
  if eq>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()))
    v = 0
    for j in range(m):
        v += a[j]*b[j]
    if v + 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 i in range(N):
    A.append(list(map(int,input().split())))
cnt=0
for i in range(N):
    total=0
    for j in range(M):
        total+=A[i][j]*B[j]
    if total +C > 0 :
        cnt+=1

print(cnt)

Submission status: Accepted

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

count=0
sum=0

for i in range(n):
    a=list(map(int,input().split()))
    for j in range(m):
        sum+=a[j]*b[j]

    sum+=c
    if sum>0:
        count+=1
    sum=0

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def main():
    inp = [[i for i in map(int, line.rstrip().split())] for line in sys.stdin.readlines()]
    res = [1 for i in range(inp[0][0])
           if sum(
            [inp[1][j]*inp[i + 2][j] for j in range(inp[0][1])]) + inp[0][2] > 0]

    print(sum(res))

if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

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

#print(n,m,c)
blist = list(map(int,input().split(' ')))
count_t = 0

for i in range(n):
  nlist=list(map(int,input().split(' ')))
  bn = 0
  for j in range(m):
    bn += blist[j]*nlist[j]
#    print("+", blist[j],"*",nlist[j],":", bn)
  if (bn + c) > 0:
    count_t += 1
print(count_t)

Submission status: Accepted

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

result = 0
for _ in range(N):
  code_list = [int(i) for i in input().split()]
  
  total = 0
  for count, num in enumerate(code_list):
    total += num * tage_lists[count]
  
  if(total + C > 0):
    result += 1

print(result)

Submission status: Accepted

Solution code:
n, m, c = [int(i) for i in input().split(" ")]
a_list = input().split(" ")
ia = 0

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

print(ia)

Submission status: Accepted

Solution code:
N,M,C=(int(i) for i in input().split())
lstb=[int(i) for i in input().split()]
L=[[int(i) for i in input().split()] for j in range(N)]
a=0
for i in range(N):
  b=0
  for j in range(M):
    b+=lstb[j]*L[i][j]
    
  if b+C>0:
      a+=1
print(a)

Submission status: Accepted

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

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

for n in range(N):
    ans = 0
    for i in range(len(A[n])):
        ans += A[n][i] * B[i]
    ans += C
    if ans > 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())))

cnt = 0
for i in range(N):
    a = np.array(list(map(int, input().split())))
    if np.sum(a * B) + 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=[[] for i in range(n)]
for i in range(n):
    a[i]=list(map(int,input().split()))
#print(a,b,c)
def judge(x,y,z):
    rt=0
    for i in range(len(x)):
        rt+=x[i]*y[i]
    return rt+z
ans=0
for i in range(n):
    jj=judge(a[i],b,c)
    #print(jj)
    if jj>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()] 
A = [[int(i) for i in input().split()] for i in range(N)]

res = []
for values in A:
  sum_res = 0
  for i in range(len(values)):
	  sum_res += values[i] * B[i]
  sum_res += C
  
  if sum_res > 0:
    res.append(1)
  else:
    res.append(0)
print(sum(res))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def main():
    n, m, c = LI()
    B = LI()

    res = 0
    for _ in range(n):
        A = LI()
        tmp = c
        for i in range(m):
            tmp += A[i] * B[i]
        if tmp > 0:
            res += 1

    return res


print(main())

Submission status: Accepted

Solution code:
def verify(A, B, C, M):
    n = 0
    for i in range(M):
        n += A[i]*B[i]
    if n + C > 0:
        return True
    return False


in1 = list(map(int, input().split()))
N = in1[0]
M = in1[1]
C = in1[2]

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

v = 0
for _ in range(N):
    A = list(map(int, input().split()))
    if verify(A, B, C, M): v += 1;

print(v)

Submission status: Accepted

Solution code:
def get_input_row():
  return [int(i) for i in input().split(" ")]

inp = input()
index = [int(a) for a in inp.split(" ")]
N = index[0]
M = index[1]
C = index[2]
B = [int(b) for b in input().split(" ")]
collect = 0
for i in range(N):
  row_data = get_input_row()
  val = sum([a * b for a, b in zip(row_data, B)]) + C
  collect += 1 if val > 0 else 0
print(collect)

Submission status: Accepted

Solution code:
from sys import stdin

N,M,C = map(int, input().split(' '))
B = stdin.readline().rstrip().split(' ')
A = [stdin.readline().rstrip().split(' ') for i in range(N)]

cnt = 0
for a in A :
  sum = 0
  for j in range(M):
    sum += int(a[j]) * int(B[j])
  sum += C
  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 _ in range(N)]

count = 0
for a in A:
    if sum(a_i*b_i for a_i, b_i in zip(a, B)) + C > 0:  
        count += 1

print(count)

Submission status: Accepted

Solution code:
n,m,c=[int(x) for x in input().split()]
b=[int(x) for x in input().split()]
count=0
for a in range(n):
    alist=[int(x) for x in input().split()]
    sum=0
    for i in range(m):
        sum+=b[i]*alist[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()))
ans = 0


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

Submission status: Accepted

Solution code:
import numpy as np
N, M, C=map(int, input().split(' '))
B = list(map(int, input().split(' ')))
b = np.array(B)
A = []
for i in range(N):
    A.append(list(map(int, input().split(' '))))
a = np.array(A)
z = np.sum(a*b, axis=1) + C
print(np.sum(z>0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
tmp = [int(i) for i in raw_input().split()]

N = tmp[0]
M = tmp[1]
C = tmp[2]

B = [int(i) for i in raw_input().split()]

count = 0
sum = 0

for i in range(N):
    tmp3 = [int(i) for i in raw_input().split()]
    
    for i in range(M):
        sum += tmp3[i]*B[i]
    if sum + C > 0:
        count += 1
    sum = 0
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
A_list = []
check = 0
kosuu = 0
B_list = list(map(int,input().split()))
for i in range(N):
    A_list = list(map(int,input().split()))
    check = 0
    for j in range(M):
        check += A_list[j]*B_list[j]
    if(check + C > 0):
        kosuu += 1
print(kosuu)

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

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

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np
N,M,C= map(int,input().split())
list_B = np.array(list(map(int,input().split())))
cnt = 0
for i in range(N):
    list_Ai = np.array(list(map(int, input().split())))
    if np.dot(list_B,list_Ai) > -C:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n,m,c = list(map(int,input().split()))
b = list(map(int,input().split()))
zz = 0
for i in range(n):
    o = 0
    q = list(map(int,input().split()))

    for j in range(m):
        o += b[j] * q[j]

    if(o+c > 0):
        zz += 1

print(zz)

Submission status: Accepted

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

B = [int(i) for i in input().split()]
count = 0
for j in range(n):
    sum = c
    A = [int(i) for i in input().split()]
    for i in range(m):
        sum += A[i] * B[i] 
    if sum > 0:
        count += 1

print(count)

Submission status: Accepted

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

SUM = C
CNT = 0

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

print(CNT)

Submission status: Accepted

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

array = list(map(int, input().strip().split(' ')))

A = []
for i in range(N):
    A.append(list(map(int, input().strip().split(' '))))

count = 0
for i in range(N):
    calc = 0
    for j in range(M):
        calc += A[i][j] * array[j]
    if 0 < calc + C:
        count += 1
print(count)

Submission status: Accepted

Solution code:
li = []
d = 0
co = 0
inp = [int(i) for i in input().split()]
inp2 = [int(i) for i in input().split()]
for k in range(inp[0]):
  li.append([int(i) for i in input().split()])
  
  
for g in li:
  for f in range(inp[1]):
    d += g[f] * inp2[f]
  d += inp[2]
  if d > 0:
    co += 1
  d = 0
print(co)

Submission status: Accepted

Solution code:
N, M, C = list(map(int, input().split()))
b_li = list(map(int, input().split()))
ct = 0
for i in range(N):
    a_li = list(map(int, input().split()))
    total = 0
    for a,b in zip(a_li, b_li):
        total += a * b
    if total + C > 0:
        ct += 1

print(ct)

Submission status: Accepted

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

out = []
res = 0
for i in range(N):
  for j in range(M):
    res += (hoge[i][j]* B[j])
  out.append((res+C) > 0)
  res = 0

  
print(sum(out))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# B問題
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(N):
    count = 0
    l = list(map(int,input().split()))
    for a in range(M):
        count+= B[a] * l[a]
        #print(count)
    if count + C > 0:
        ans+=1
print(ans)