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:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(np.sum(np.dot(b, a.T) > -c))


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

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

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

print(counter)

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

Submission status: Accepted

Solution code:
import numpy as np


def solve(string):
    n, m, c, *ba = map(int, string.split())
    b = np.asarray(ba[:m])
    a = np.asarray(ba[m:])
    a.resize((n, m))
    return str(sum(np.dot(b, a.T) > -c))


if __name__ == '__main__':
    n, m, o = map(int, input().split())
    print(solve('{} {} {}\n'.format(n, m, o) + '\n'.join([input() for _ in range(n + 1)])))

Submission status: Accepted

Solution code:
import numpy as np
def solve(n, m, c, b, A):
    b = np.asarray(b)
    A = np.asarray(A)
    ans = 0
    for i in range(n):
        if np.dot(b, A[i]) + c > 0:
            ans += 1
    return ans

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())))
print(solve(n, m, c, b, A))

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([list(map(int,input().split())) for i in range(n)])
print(np.sum(np.dot(a,b.T)+c>0)) # 10,11

Submission status: Accepted

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

for i in range(N):
    calc_result = 0
    for m in range(M):
        calc_result += A[i][m] * B[m]
    if calc_result + C > 0:
        ok_count += 1

print(ok_count)

Submission status: Accepted

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

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()))
  point = c
  for i in range(m):
    point += a[i]*b[i]
  if point > 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 n in range(N)]

def Sof(a):
  d=C
  for m in range(M):
    d+=a[m]*B[m]
  return d > 0

co=0
for i in range(N):
  if(Sof(A[i])):
    co+=1

print(co)

Submission status: Accepted

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

# 1行読んで整数化
N, M, C = map(int, input().split())

# Bは長さが不定なので1行読んで整数化しリストにする
B = list(map(int, input().split()))

# 内包表記で1行読んで整数化しリストにしたものをさらにリストにする
A = [list(map(int, input().split())) for n in range(N)]

# A[i] を渡すと正解かどうか判定する関数
def isAC(a):
  v = C
  for m in range(M):
    v += a[m] * B[m]
  return v > 0

# すべてのソースコードに対して正解かどうか判定し、正解ならカウント
count = 0
for i in range(N):
  if (isAC(A[i])):
    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 _ in range(N):
    An = list(map(int, input().split()))
    if sum([An[m] * B[m] for m in range(M)]) + C > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import numpy as np

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

b_list = np.array(list(map(int, input().split())))
correct = 0

for n in range(N):
  a_list = np.array(list(map(int, input().split())))
  ab = a_list * b_list 
  ab = np.sum(ab) + C
  
  if ab > 0:
    correct += 1
  
print(correct )

Submission status: Accepted

Solution code:
# coding: utf-8

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())))
    tmp = A * B
    
    if np.sum(tmp) + C > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

cnt = 0

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

Submission status: Accepted

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 > 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 = answer + is_okay(A, B, C)

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
	res = 0
	A_list = list(map(int, input().split()))
	for i in range(len(A_list)):
		res += A_list[i]*B_list[i]
	if res + C > 0:
		count += 1
print(count)

Submission status: Accepted

Solution code:
def main():
    n, m, c = map(int, input().split())
    bb = list(map(int, input().split()))
    res = 0
    for _ in range(n):
        aa = list(map(int, input().split()))
        if sum(a * b for (a, b) in zip(aa, bb)) + c > 0:
            res += 1
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

b=list(map(int, input().split()))
b=np.array(b)
count=0
for _ in range(N):
    a=list(map(int, input().split()))
    a=np.array(a)
    e=a*b
    d=np.sum(e,axis=0)+C
    if d>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 _ in range(N):
    A = list(map(int, input().split()))
    sum = 0
    for i in range(M):
        sum += B[i] * A[i]
    sum += C
    if sum > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,M,C = map(int, input().split(' '))
B = list(map(int, input().split(' ')))
A = []
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: Accepted

Solution code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
ans = 0
count = 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:
n,m,c=map(int,input().split());d=0
b=list(map(int,input().split()))
for _ in[0]*n:
 a=list(map(int,input().split()))
 d+=1*(sum(x*y for x,y in zip(a,b))+c>0)
print(d)

Submission status: Accepted

Solution code:
N, M, C = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
A = []
for i in range(N):
    A.append([int(i) for i in 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:
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: Accepted

Solution code:
from numpy import*
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
b=array(b)
ans=0
for i in range(n):
    a=array(list(map(int,input().split())))
    ans+=(sum(a*b)+c>0)
print(ans)

Submission status: Accepted

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)
 
print(np.sum(np.dot(A, B.T) > (-1*C)))

Submission status: Accepted

Solution code:
nmc = input().split()
n, m, c = int(nmc[0]), int(nmc[1]), int(nmc[2])
ba_li = []
for i in range(n + 1):
    ba_add = input().split()
    ba_li.append(ba_add)
b_li = ba_li[0]
count = 0
for i in range(n):
    sum = 0
    for j in range(m):
        sum += int(ba_li[i + 1][j]) * int(b_li[j])
    if sum > -c:
        count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np

N,M,C = (int(_) for _ in input().split())
B = np.array([int(_) for _ in input().split()])
A = []
for i in range(N):
    A.append(np.array([int(_) for _ in input().split()]))
count = 0 #正答したコードの数
for a in A:
    if np.dot(a,B) + C > 0:
        count += 1

print(count)

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())))
  
#Aij = A[i][j]

answer=0
for i in range(N):
  answer += (sum([a*b for a, b in zip(A[i], B)]+[C]) > 0)
  
print(answer)

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

Submission status: Accepted

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

cnt = 0
n = a[1]

for i in range(a[0]):
    num = []
    num = list(map(int, input().split())) 
    sum = 0
    for j in range(a[1]):
        sum += b[j]*num[j]
   
    
    if sum + a[-1] > 0:
        cnt +=1

print(cnt)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
crt = 0 
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())))
for i in a: 
    total = 0
    for k in range(m): 
        total += i[k] * b[k]
    if total + c > 0: crt += 1
print(crt)

Submission status: Accepted

Solution code:
import io, sys, atexit, os

import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li ():
	return list (map (int, input ().split ()))


def num ():
	return map (int, input ().split ())


def nu ():
	return int (input ())


def find_gcd ( x, y ):
	while (y):
		x, y = y, x % y
	return x


mm = 1000000007



def solve ():
	t = 1
	for it in range (t):
		n,m,c=num()
		b=li()
		cc=0
		for i in range(n):
			a=li()
			ss=c
			for j in range(m):
				ss+=a[j]*b[j]
			if(ss>0):
				cc+=1
		print(cc)





if __name__ == "__main__":
	solve ()

Submission status: Accepted

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

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

codes = list()

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

counter = 0
for code in codes:
    if sum([co * b for co, b in zip(code, li_b)]) + c > 0:
        counter += 1
print(counter)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from itertools import starmap

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):
	pair = list(zip(A[i], B))
	mul = starmap(lambda a, b: a*b, pair)
	if sum(mul) + 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(" ")]
A = [[int(x) for x in input().split(" ")] for _ in range(N)]


print(len([sum(ab) + C for ab in [[a * b for (a, b) in zip(AA, B)]
                                  for AA in A] if sum(ab) + C > 0]))

Submission status: Accepted

Solution code:
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split()))
right = -C
result = 0
for _ in range(N):
    v = 0
    for i, Ai in enumerate(list(map(int, input().split()))):
        v += Ai * B[i]
    if v > right:
        result += 1
print(result)

Submission status: Accepted

Solution code:
# Can you solve this?

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

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

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=[]
count=0
for i in range(n):
    a.append(list(map(int,input().split())))
na=np.array(a)
nab=np.dot(na,b)
for j in range(n):
    if nab[j]>-c:
        count+=1
        j+=1
print(count)

Submission status: Accepted

Solution code:
from math import *



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

ct=0

for i in range(n):
	a=list(map(int,input().split(" ")))
	sm=0

	for i in range(len(a)):
		sm+=(b[i]*a[i])
	if(sm+c>0):
		ct+=1
print(ct)

Submission status: Accepted

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

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

ans = 0

for index, item in enumerate(range(0,N)):
    sum = 0
    for ind, itm in enumerate(range(0,M)):
        sum += B[ind] * A[index][ind]
    sum += C
    if sum > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,M,C = [int(x) for x in input().split()]
Bls =  [int(x) for x in input().split()]
Als = []
for _ in range(N):
    als = [int(x) for x in input().split()]
    Als.append(als)
    als = []

count = 0
for i in range (N):
    Sum = C
    for k in range (M):
        a = Als[i][k]*Bls[k]
        Sum += a
        a = 0
    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)]
s = []
for i in range(n):
        x = 0
        for j in range(m):
                x += a[i][j] * b [j]
        s.append(x+c)
print(sum(x>0 for x in s))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#input
N,M,C=input().split(" ")
B=input().split(" ")
N=int(N)
M=int(M)
C=int(C)
B=[int(b) for b in B]
A=[]
for i in range(N):
	l=input().split(" ")
	A.append([int(a) for a in l])

import numpy as np

c=0
for a in A:
	if(np.dot(a,B)+C>0):
		c+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input1 = input().split()
B = input().split()


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

result = 0

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

elements = 0
result = 0

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

for i in range(line):
  elements = 0
  num = base_data[1]
  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: Accepted

Solution code:
import numpy as np
N,M,C=map(int,input().split())
b=list(map(int,input().split()))
a=[list(map(int,input().split())) for i in range(N)]
t=0
for i in range(N):
    t+=(np.dot(a[i],b)+C>0)
print(t)

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()]
A = [input().split() for i in range(N)]
A = np.array(A,dtype='int32')
B = np.array(B,dtype='int32').reshape((M,1))

ans = np.sum(np.dot(A,B) +C > 0)
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for i in range(0,N):
  score=0
  A=list(map(int,input().split(" ")))
  #print(A)
  for j in range(0,M):
    score+=A[j]*B[j]
  count+=(score+C>0)

print(count)

Submission status: Accepted

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

right_count = 0
for _ in range(N):
    As = list(map(int, input().split()))
    total_val = sum([a*b for (a, b) in zip(As, Bs)]) + C
    if total_val > 0:
        right_count += 1

print(right_count)

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 = map(int, input().split())
  res += sum(a * b for a, b in zip(A, B)) + C > 0
print(res)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b_lists=list(map(int,input().split()))
true_num=0
for i in range (1,n+1):
  judge=0
  a_lists=list(map(int,input().split()))
  for j in range (1,m+1):
    judge=judge+b_lists[j-1]*a_lists[j-1]
  if judge+c>0:
    true_num=true_num+1
  else:
    true_num=true_num
print(true_num)

Submission status: Accepted

Solution code:
from sys import stdin

N, M, C = [int(x) for x in stdin.readline().rstrip().split()]
Bi = [int(x) for x in stdin.readline().rstrip().split()]
Ai_list = [list(map(int, stdin.readline().rstrip().split())) for _ in range(N)]

count = 0

for Ai in Ai_list:
    sum = 0
    for i in range(M):
        sum += Ai[i] * Bi[i]
    sum += C
    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()))
r=0
for _ in range(n):
  a=list(map(int,input().split()))
  s=0
  for i in range(m):
    s+=a[i]*b[i]
  if s > -c:
    r+=1
print(r)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = []
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):
    S = 0
    for j in range(M):
        S += A[i][j] * B[j]
    if S + C > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = map(int, input().split())
B_line = np.array(list(map(int, input().split())))
count = 0
for i in range(N):
    A_line = np.array(list(map(int, input().split())))
    if np.sum(A_line * B_line) + C > 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np

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

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

ans_cnt = 0

for i in range(N):
  A = np.asarray(list(map(int,input().split(" "))))
  if np.dot(A,B)+C > 0:
    ans_cnt += 1

print(ans_cnt)

Submission status: Accepted

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

Submission status: Accepted

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

date = input().split()
B_date = input().split()

N = int(date[0])
M = int(date[1])
C = int(date[2])

B = []

for i in range(1,M+1):
    B.append(int(B_date[i-1]))

A = []

for j in range(1, N +1):
    A_sub = []
    a = input().split()
    for k in range(1,M+1):
        A_sub.append(int(a[k-1]))
    A.append(A_sub)


ans = 0

for i in range(1, N +1):
    total = 0
    for m in range(1, M + 1):
        total += A[i-1][m-1]*B[m-1]
    total += C

    if total > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

def main():
    """
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))
    """
    N ,M, C = map(int, input().split())
    b_arr = np.array(list(map(int, input().split())))
    a_mat = np.array( [ list(map(int, input().split())) for i in range(N) ] )
    
   # for i in range(N):
    #    a_mat[i] = np.array(list(map(int, input().split())))
        #a_mat[i] = np.array([int(x) for x in input().split(' ')])

        #print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )
    print ( np.array(np.where(a_mat.dot(b_arr) > -C)).shape[1] )

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# B - Can you solve this?
import numpy as np
N, M, C = map(int, input().split())
B = np.array(list(map(int, input().split())))
A = np.zeros((N, M))
for i in range(N):
    A[i,:] = np.array(list(map(int, input().split())))
AB = A * B.reshape((1, M))
print(np.sum(np.sum(AB, 1) > -C))

Submission status: Accepted

Solution code:
def get_ints():
  return map(int, input().split())

N, _, C = get_ints()
B = list(get_ints())

n = 0
for _ in range(N):
  A = list(get_ints())
  J = sum(a * b for a, b in zip(A, B)) + C
  if J > 0:
  	n += 1
    
print(n)

Submission status: Accepted

Solution code:
import pdb

def main():
    param = list(map(int, input().split()))

    n = param[0]
    m = param[1]
    c = param[2]

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

    ans = 0
    for source in range(n):
        count = 0
        for tokucho in range(m):
            count += data[source][tokucho] * b[tokucho]
            
        if count + c > 0:
            ans += 1
            

    print(ans)
    
    return

        
if __name__ == '__main__':
    main()

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):
    temp = [int(x) for x in input().split()]
    A.append(temp)


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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N,M,C = list(map(int,input().split()))
B= list(map(int,input().split()))


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

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
Blis = list(map(int,input().split()))
Alis = []
count = 0
for _ in range(N):
    lis = list(map(int,input().split()))
    Alis.append(lis)
for i in range(N):
    codei = 0
    for j in range(M):
        codei += Alis[i][j] * Blis[j]
    if codei + C > 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, M: int, C: int, B: "List[int]", A: "List[List[int]]"):
    ret = 0
    for i in range(N):
        tmp = 0
        for j in range(M):
            tmp += A[i][j] * B[j]
        tmp += C
        if tmp > 0:
            ret += 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    B = [ int(next(tokens)) for _ in range(M) ]  # type: "List[int]"
    A = [ [ int(next(tokens)) for _ in range(M) ] for _ in range(N) ]  # type: "List[List[int]]"
    solve(N, M, C, B, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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: Accepted

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: 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):
    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=[int(x) for x in input().split()]
ans=0

for i in range(N):
    res=[int(x) for x in input().split()]
    cnt=0
    for j in range(M):
        cnt += B[j]*res[j]
    if cnt+C >0:
        ans+=1

print(ans)