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: Wrong Answer

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

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

Submission status: Wrong Answer

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

import numpy as np
B = np.array(b).T
A = np.array(a)
C = np.ones([N,1])*c
res = np.dot(A,B) + C
print(np.sum(res > 0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(map(int, input().split()))
N = S[0]
M = S[1]
C = S[2]
AB = [list(map(int, input().split())) for i in range(N+1)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def product(i,j):
  return sum(ii+jj for ii,jj in zip(i,j))

res=0
for t in temp:
  if product(stand,t)+C>0:
    res+=1

print(res)

Submission status: Wrong Answer

Solution code:
N,M,c=map(int,input().split())
c=-1*c
res=0
stand=list(map(int,input().split()))
def product(i,j):
  return sum(ii+jj for ii,jj in zip(i,j))
for i in range(N):
  temp=list(map(int,input().split()))
  if product(stand,temp)>c:
    res+=1
print(res)

Submission status: Wrong Answer

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

for i in range(n):
    a.append(list(map(int, input().split())))
    print(a)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M,C=map(int,(input()).split())
List_B=[int(i) for i in (input()).split()]
t=0
for j in range(1,N+1):
  List_A=[int(k) for k in (input()).split()]
  if sum([x*y for (x,y) in zip(List_A,List_B)])==-C:
    t+=1
print(t)

Submission status: Wrong Answer

Solution code:
from sys import stdin

N, M, C = map(int, stdin.readline().split())
B = list(map(int, stdin.readline().split()))
ans = 0
for i in range(N):
  if sum(list(map(int, stdin.readline().split())), C) > 0:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

s = input().rstrip().split(' ')
n, m, c = int(s[0]),int(s[1]),int(s[2])

b = input().rstrip().split(' ')

a = []
count = 0
sum = c
for i in range(n):
    a = input().rstrip().split(' ')
    for j in range(m):
        sum += int(a[j])*int(b[j])
    a.clear()
    if sum > 0:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
ansrestwo = []
while sumres != []:
    if sumres[0] - 1 > 0:
        ansres.append(int(sumres[0]))
    sumres.pop(0)

while ansres != []:
    if ansres[0] != 0:
        ansrestwo.append(int(ansres[0]))
    ansres.pop(0)

#出力部
print(len(ansrestwo))

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > -1:
        ansres.append(int(sumres[0]))
    sumres.pop(0)

#出力部
print(len(ansres))

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > 0:
        ansres.append(int(sumres[0]) - 1)
    sumres.pop(0)

#出力部
print(len(ansres))

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > 0:
        ansres.append(sumres[0] - 1)
    sumres.pop(0)

#出力部
print(len(ansres))

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > 0:
        ansres.append(sumres[0] - 1)
    sumres.pop(0)

#出力部
print(ansres)

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(int(sum(sumabc) + c))
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > 0:
        ansres.append(sumres[0])
    sumres.pop(0)

#出力部
print(len(ansres))

Submission status: Wrong Answer

Solution code:
#入力部
nmc = list(map(int,input().split()))
n = nmc[0]
m = nmc[1]
c = nmc[2]
b = list(map(int,input().split()))
a = [list(map(int,input().split())) for i in range(n)]

#演算部
x = 0
sumabc = []
sumres = []
for j in range(n):
    y = 0
    for k in range(m):
        p = a[x][y] * b[y]
        sumabc.append(p)
        y += 1
    sumres.append(sum(sumabc) + c)
    x += 1

z = 0
ansres = []
while sumres != []:
    if sumres[0] > 0:
        ansres.append(sumres[0])
    sumres.pop(0)

#出力部
print(len(ansres))

Submission status: Wrong Answer

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:
    print(sum([ta * tb for ta, tb in zip(a, B)]) + C)
    
    if(sum([ta * tb for ta, tb in zip(a, B)]) + C > 0):
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
def is_okay(A, B, C):
    sum = 0
    for i in range(len(B)):
        sum = sum + A[i] * B[i]

    return sum > C

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

answer = 0
for _ in range(N):
    A = tuple(map(int, input().split()))
    answer = answer + is_okay(A, B, C)

print(answer)

Submission status: Wrong Answer

Solution code:
def is_okay(A, B, C):
    sum = 0
    for i in range(len(B)):
        sum += A[i] * B[i]

    return sum > 0

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

answer = 0
for _ in range(N):
    A = tuple(map(int, input().split()))
    answer += is_okay(A, B, C)

print(answer)

Submission status: Wrong Answer

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

#正答数
Answer = C
X = 0
for x in range(N):
  for y in range(M):
    Answer += A[x][y]*B[y]
  if Answer > 0:
    X += 1
    Answer = C

print(X)

Submission status: Wrong Answer

Solution code:
n, m, c = list(map(int, input().split()))
B = list(map(int, input().split()))
count = 0
li = [list(map(int, input().split())) for i in range(n)]

for i in range(n):
    d = 0
    for j in range(m):
        d = li[i][j] * B[j]
    else:
        d += c
        if d > 0:
            count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n, m, c = list(map(int, input().split()))
B = list(map(int, input().split()))
count = 0
li = [list(map(int, input().split())) for i in range(n)]

for i in range(n):
    num = 0
    for j in range(m):
        d = li[i][j] * B[j]
    else:
        d += c
        if d > 0:
            count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np
N, M, C = list(map(int, input().split()))
B = np.asarray(input().split(), dtype=np.int)
A = []
for i in range(N):
  A.append(list(map(int, input().split())))
A = np.asarray(A, dtype=np.int)
 
np.sum(np.dot(A, B.T) > (-1*C))

Submission status: Wrong Answer

Solution code:
base_data = list(map(int,input().split()))
line = base_data[0]
num = base_data[1]
last_num = base_data[2]

elements = 0
result = 0

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

for i in range(line):
  data = list(map(int,input().split()))
  while num > 0:
    elements += data[num-1] * multi_data[num-1]
    num -= 1
  if elements + last_num > 0:
    result += 1

print(result)

Submission status: Wrong Answer

Solution code:
#B
count = 0
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
for i in range(n):
    a = list(map(int, input().split()))
    ab=0
    for j in range(m):
        ab = a[j] * b[j]
    if -c<ab:
        count += 1
print(count)

Submission status: Wrong Answer

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()))
    x = C
    for index, val in enumerate(B):
        x += A[index] * val
    if x > 0:
        count += 1
    print(x)
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n, m, c = map(int, sys.stdin.readline().split())
blist = list([int(i)-1 for i in sys.stdin.readline().split()])

ans = 0
for _ in range(n):
    tmp = list([int(i)-1 for i in sys.stdin.readline().split()])
    check = c
    for i in range(m):
        check += tmp[i] * blist[i]
    if check > 0:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,M,C=map(int, input().split())
# N:Aのソースコード(配列)数
# M:AとBの配列の中身の数
# C:計算で利用

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

print(x)

Submission status: Wrong Answer

Solution code:

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

    num = 0
    for i in range(N):
        sum = 0
        for j in range(M):
            sum = sum + A[i][j]*B[j]
        result = sum + C
        if (result > 0 ):
            num = num + 1
    # print(num)
    return num

main()

Submission status: Wrong Answer

Solution code:
def main():
    N, M, C = map(int, input().split())
    # B = []
    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('B=',B)
    print('A=',A)
    # sum = 0
    num = 0
    for i in range(N):
        sum = 0
        for j in range(M):
            sum = sum + A[i][j]*B[j]
        result = sum + C
        if (result > 0 ):
            num = num + 1
    print(num)
    return num

main()

Submission status: Wrong Answer

Solution code:
def main():
    N, M, C = map(int, input().split())
    # B = []
    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('B=',B)
    print('A=',A)
    # sum = 0
    num = 0
    for i in range(N):
        sum = 0
        for j in range(M):
            sum = sum + A[i][j]*B[j]
        result = sum + C
        if (result > 0 ):
            num = num + 1
    # print(num)
    return num

main()

Submission status: Wrong Answer

Solution code:
import numpy

Submission status: Wrong Answer

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

for i in range(n):
	a = list(map(int, input().split()))
	for x in range(m):
		cal += a[x] * b[x]
		if cal > 0:
			cnt += 1
			break

print(cnt)

Submission status: Wrong Answer

Solution code:
n, m, c = map(int, input().split())
b = list(map(int, input(). split()))
cal = -10
cnt = 0

for i in range(n):
	a = list(map(int, input().split()))
	for x in range(m):
		cal += a[x] * b[x]
		if cal > 0:
			cnt += 1
			break

print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def na():
    return map(int, stdin.readline().split())


n, _, c = na()
bs = na()

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
for i in range(1,N+1):
    Ai = [int(j) for j in input().split()]
    ai = np.array(Ai)   
b = np.array(B)
cnt = 0
for i in range(1,N+1):
    if (np.dot(ai,b) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
for i in range(1,N):
    Ai = [int(j) for j in input().split()]
    ai = np.array(Ai)   
b = np.array(B)
cnt = 0
for i in range(1,N):
    if (np.dot(ai,b) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
for i in range(1,N):
    Ai = [int(j) for j in input().split()]
    ai = np.array(Ai)   
b = np.array(B)
bt = b.reshape([M,1])
cnt = 0
for i in range(1,N):
    if (np.dot(ai,bt) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
for i in range(1,N):
    Ai = [int(j) for j in input().split()]
    ai = np.array(Ai)   
b = np.array(B)
bt = b.reshape([M,1])
cnt = 0
for i in range(1,N):
    if (np.dot(ai,bt) + C >0):
         cnt += 1
print(cnt)

Submission status: Wrong Answer

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 i in range(N)]

for i in range(N):
    sum = C
    for j in range(M):
        sum += A[i][j]*B[j]
    print(sum,sum>0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tmp = input()
N = int(tmp.split(' ')[0])
M = int(tmp.split(' ')[1])
C = int(tmp.split(' ')[2])
B = [int(b) for b in input().split(' ')]
cnt = 0
for i in range(N):
  A = [int(a) for a in input().split(' ')]
  sum = 0
  for j in range(M):
    sum += B[j]*A[j]
  sum += C
  if C > 0:
    cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np

N, M, C= map(int, input().split())
B = np.array(list(map(int, input().split())))
A = np.array([list(map(int, input().split())) for _ in range(N)])

print(np.count_nonzero(np.dot(A, B) + C))

Submission status: Wrong Answer

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

count = 0
for i in range(N):
    lst = list(map(int, input().split()))
    lb = 0
    for l,b in zip(lst,B):
        lb + l * b
    if lb - C > 0:
        count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cnt = 0

for i in A:
    print (i)
    tmp = 0
    for j, b in zip(i, B):
        tmp += j*b
    tmp += C
    if tmp > 0:
        cnt += 1

print (cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

counter = 0
for i in range(n):
    x = 0
    for j in range(m):
        x += As[i][j] * Bs[j]
        x += c
    if x > 0:
        counter += 1
print(counter)

Submission status: Wrong Answer

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

counter = 0
for i in range(n):
    x = 0
    for j in range(m):
        x += As[i][j] * Bs[j]
        if x + c > 0:
            counter += 1
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, m, C = map(int, input().split())
B = list(map(int, input().split()))
source = []
score  = 0
for i in range(n):
    source.append([int(x) for x in input().split()])

for j in range(0,n-1):
    pre = 0
    for k in range(0,m-1):
        pre += source[j][k]*B[k]
    else:
        if pre + C > 0:
            score += 1
print(score)

Submission status: Wrong Answer

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


#a = list()
#for i in range(M):
#    a.append(map(int, input().split()))

#a = list(a)

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

arrA = np.array(A)

D = np.empty((0,M), int)
for i in range(N):
    D = np.append(D, arrB*arrA[i], axis=0)
#    C.append(arrB*arrA[i])


F = np.empty((0,N), int)
for i in range(N):
    F = np.append(F, np.sum(D[i]))

E = F + C
t=0
for i in range(N):
    if E[i]>0:
        t = t+1
    else:
        t =t



print(arrB)
print(arrA)
print(D)
print(E)
print(F)
print(t)

Submission status: Wrong Answer

Solution code:
n, m, C = map(int, input().split())
B = list(map(int, input().split()))
source = []
pre = 0
score  = 0
for i in range(n):
    source.append([int(x) for x in input().split()])

for j in range(0,n-1):
    for k in range(0,m-1):
        pre += source[j][k]*B[k]
    else:
        if pre + C > 0:
            score += 1
        pre = 0
print(score)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

d = 0

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

print(ans)

Submission status: Wrong Answer

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())))
sum = 0
count = 0

for i in range(n):
    for j in range(m):
        sum = sum + b[j]*a[i][j]

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

print(count)

Submission status: Wrong Answer

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

d = 0

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

print(ans)

Submission status: Wrong Answer

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())))
sum = 0
count = 0

for i in range(n):
    for j in range(m):
        sum = sum + b[j]*a[i][j]

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

print(count)

Submission status: Wrong Answer

Solution code:
#B - Can you solve this?
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = list(range(N))
for i in range(N):
    A[i] = list(map(int, input().split()))
for i in range(N):
    gokei = 0
    gokaku = 0
    for j in range(M):
        gokei += A[i][j]*B[j]
    gokei += C
    if gokei > 0:
        gokaku += 1
print(int(gokaku))

Submission status: Wrong Answer

Solution code:
#B - Can you solve this?
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = list(range(N))
for i in range(N):
    A[i] = list(map(int, input().split()))
for i in range(N):
    gokei = 0
    gokaku = 0
    for j in range(M):
        gokei += int(A[i][j]*B[j])
    gokei += C
    if gokei > 0:
        gokaku += 1
print(int(gokaku))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

N, M, C = map(int, input().split())
M=[int(x) for x in input().split()]
nlist=[]
for i in range(N):
    nlist.append([int(x) for x in input().split()])

nlist=np.array(nlist)
M= np.array(M)
ans=(nlist*M+C).sum(axis=1)
print((ans>0).sum())

Submission status: Wrong Answer

Solution code:
import numpy as np

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

M=[int(x) for x in input().split()]

nlist=[]

for i in range(N):
    nlist.append([int(x) for x in input().split()])

nlist=np.array(nlist)
M= np.array(M)
ans=(nlist*M+C).sum(axis=1)
print((ans>0).sum())

Submission status: Wrong Answer

Solution code:
##
NMC=input().split()
N=int(NMC[0])
M=int(NMC[1])
C=int(NMC[2])
#
Bs=input().split()#M個の数字
#
count=0
dict={}
#
for i in range(N):
  dict[i]=input().split()#str型注意
##
for j in range(N):
  atai=0
  for k,s in zip(dict[j],range(M)):
    atai+=int(k)*int(Bs[s])
  if (atai+C)>0:
    count+=1
  print(str(atai),str(count))
print(str(count))

Submission status: Wrong Answer

Solution code:
# S = input()
# print('Heisei' if S <= '2019/04/30' else 'TBD')

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

total=0
count=0


for j in range(0,n):
	total=0
	for k in range(0,m):
		total+=e[j][k]*b[k]
		print("total is ",total)
	if total+c>0:
		count+=1

print(count)