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:
n,m,c = map(int,input().split())
b = list(map(int,input().split()))

ans = 0
for i in range(n):
    a = list(map(int,input().split()))
    t = c
    for j in range(m):
        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()))
A=[]
for i in range(N):
    A.append(list(map(int,input().split())))


cnt =0
for a in A:
    c = 0
    for j in range(len(a)):
        c += a[j]*B[j]
    if c+C > 0:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N,M,C = map(int,input().split())
b = [int(i) for i in input().split()]
a = []
ret = 0
for i in range(N):
    a.append([int(j) for j in input().split()])

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

Submission status: Accepted

Solution code:
r = 0
a,b,c = map(int,input().split())
moto = list(map(int,input().split()))
for i in range(a):
    if r == 0:
        sosu =0
    else:
        if f+c<=0:
            sosu += 0
        else:
            sosu +=1
    tasu = list(map(int,input().split()))
    r +=1
    for q in range(b):
        if q == 0:
            f = moto[q]*tasu[q]
        else :
            f +=moto[q]*tasu[q]
if f+c<=0:
    sosu += 0
else:
     sosu +=1
print(sosu)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N, M, C] = [int(input_raw[0]), int(input_raw[1]), int(input_raw[2])]
    input_raw = read_func().strip().split()
    B = [int(input_raw[i]) for i in range(M)]


    count = 0
    for i in range(N):
        input_raw = read_func().strip().split()
        s = 0
        for j in range(M):
            s += int(input_raw[j]) * B[j]
        s += C
        if s > 0:
            count += 1

    print count


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,m,c,*a=map(int,open(0).read().split())
b=a[:m]
print(sum(-c<sum(x*y for x,y in zip(b,a[i*m:-~i*m]))for i in range(1,n+1)))

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = [int(i) for i in input().split()]
B = np.array([int(i) for i in input().split()])
A = []
cor = 0
for i in range(N):
    A = np.array([int(j) for j in input().split()])
    if (sum(A*B) + C) > 0:
        cor += 1
        A = []
    else:
        A = []
print(cor)

Submission status: Accepted

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

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 n in range(0, N):
  A.append([int(i) for i in input().split()])

num = 0
for n in range(0, N):
  acc = C
  for m in range(0, M):
    acc = acc + A[n][m] * B[m]
  if acc > 0:
    num = num + 1

print(num)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- conding: utf-8 -*-
import numpy as np

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(len(A)):
    result = np.dot(A[i], B) + C
    if result > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
f=lambda:list(map(int,input().split()))
n,m,c=f()
b=f()
print(sum(-c<sum(x*y for x,y in zip(b,f()))for _ in[0]*n))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
blist = [int(i) for i in input().split()]
codes = [input().split() for i in range(n)]
codes = [[int(j) for j in i] for i in codes]
sum_1 = 0
ans = 0
for code in codes:
    for num in range(m):
        sum_1 += code[num]*blist[num]
    sum_1 += c
    if sum_1 >0:
        ans += 1
        sum_1 = 0
    else:
        sum_1 = 0

print(ans)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().rstrip().split(' '))
bt = list(map(int, input().rstrip().split(' ')))
r = 0
for i in range(N):
    at = list(map(int, input().rstrip().split(' ')))
    sum = 0
    for j in range(M):
        sum += at[j] * bt[j]

    sum += C
    if sum > 0:
        r += 1


print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	n,m,c= map(int, io().split())
	bs= list(map(int, io().split()))
	ret=0
	for _ in range(n):
		a_s= list(map(int, io().split()))
		ll=[a*b for a,b in zip(a_s,bs)]
		if sum(ll)+c>0:
			ret +=1
		
	return ret

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Submission status: Accepted

Solution code:
import numpy as np
I=lambda:list(map(int,input().split()))
n,m,c=I()
b=np.array(I())
s=0
for _ in range(n):
  d=np.array(I())
  s+=1 if sum(d*b)+c>0 else 0
print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar  9 20:14:08 2019

@author: USER
"""

n,m,c = [int(s) for s in input().split(' ')]
b = [int(s) for s in input().split(' ')]
a = [[int(s) for s in input().split()] for i in range(n)]

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

Submission status: Accepted

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

def main():
	B = []
	N, M, C = map(int, input().split(" "))
	tmp = input().split(" ")
	B = [int(s) for s in tmp]
	
	src = []
	for _ in range(N):
		tmp = input().split(" ")
		src.append([int(s) for s in tmp])
		
	ans = 0
	for i, val in enumerate(src):
		total = 0
		for j, vol in enumerate(val):
			total = total + (vol * B[j])
		total = total + C
		
		if total > 0: ans = ans + 1
	
	print(ans)
			
if __name__ == "__main__":
	main()

Submission status: Accepted

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

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

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

count = 0
F = []
for i in range(N):
    formula = 0
    for j in range(M):
        formula = formula + A_all[i][j]*B[j]
    F.append(formula + C)
    if F[i] > 0:
        count += 1
print(count)

Submission status: Accepted

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]
	if total+c>0:
		count+=1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def check(B, C):
    def _check(A):
        return sum([A[i] * B[i] for i in range(len(B))]) + C > 0
    return _check


def main():
    N, M, C = MI()
    B = MIL()
    A = []
    for i in range(N):
        A.append(MIL())
    return sum(map(check(B, C), A))


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n,m,c=map(int,input().split())
B=input().split(" ")
count=0
for i in range(n):
    A=[]
    ans=0
    A=input().split(" ")
    for j in range(m):
        ans+=int(A[j])*int(B[j])
    if(ans+c>0):
        count+=1
    
print(count)

Submission status: Accepted

Solution code:
n, m, c = [int(_) for _ in input().split()]
b = [int(_) for _ in input().split()]
a = [[int(_) for _ in input().split()] for i in range(n)]
sum = 0
cnt = 0
for i in range(n):
  sum = 0
  for j in range(m):
    sum += a[i][j] * b[j]
  if sum + 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):
    Ai = list(map(int, input().split()))
    A.append(Ai)
CA = 0

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

print(CA)

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

Submission status: Accepted

Solution code:
num_code, num_character, const_correct = map(int, input().split(' '))
multiplier = [int(x) for x in input().split(' ')]

num_correct = 0
for i in range(0, num_code):
    numbers = [int(y) for y in input().split(' ')]
    multiplied = [x*y for x, y in zip(multiplier, numbers)]

    if sum(multiplied) + const_correct > 0:
        num_correct += 1

print(num_correct)
exit(0)

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

t = 0

for a_i in a:
    k = 0
    for i, a_ii in enumerate(a_i):
        k += a_ii * b[i]
    if k + c > 0:
        t += 1

print(t)

Submission status: Accepted

Solution code:
def can_you_solve_this(
        N: int, M: int, A: list, B: list, C: int)->int:
    AB = [0] * N
    for i in range(N):
        for j in range(M):
            AB[i] += A[i][j] * B[j]
        AB[i] += C
    return sum(1 for ab in AB if ab > 0)


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



print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import numpy as np
N,M,C = map(int, input().split())
i = [list(map(int, input().split())) for _ in range(N+1)]
i = np.array(i)
B = i[0,0:M]
A = i[1:,0:M]
AA = A * B
BB = np.sum(AA,axis=1)+C
ANS = np.where(BB > 0,1,0).sum()
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 = [list(map(int,input().split())) for _ in range(n)]
cnt = 0
for i in range(n):
    s = 0
    for j in range(m):
        if j != m:
            s += a[i][j]*b[j]
    if s+c > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

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

count = 0

for i in range(N):
    sum = 0
    A = input().rstrip().split(" ")
    A = list(map(int, A))
    for i in zip(A, B):
        sum += i[0] * i[1]
    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()))
A = [list(map(int, input().split())) for i in range(N)]
count=0
for n in range(N):
    sum = C
    for m in range(M):
        sum += B[m]*A[n][m]
    if sum > 0:
        count+= 1
print(count)

Submission status: Accepted

Solution code:
import scipy as sp


num_of_CA = 0

N, M, C = list(map(int, input().split()))
B_list = sp.array(list(map(int, input().split())))

for i in range(N):
    A_list = sp.array(list(map(int, input().split())))
    if sp.sum(A_list*B_list)+C > 0:
        num_of_CA += 1

print(num_of_CA)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = []
count = 0
for i in range(N):
    Ai = list(map(int, input().split()))
    temp = C
    for j in range(M):
        temp = temp + Ai[j]*B[j]
    if temp > 0:
        count = count + 1
print(count)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N, M, C = tuple(map(int, input().split()))
b_list = list(map(int, input().split()))
a_list = [list(map(int, input().split())) for _ in range(N)]
correct = 0
for a in a_list:
  mul = sum([x * y for x, y in zip(b_list, a)])
  if mul + C > 0:
    correct += 1
print(correct)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N, M, C = map(int, input().split())
    B = [int(number) for number in input().split()]
    A = []
    A = [[int(m) for m in input().split()] for n in range(N)]

    num_of_clear = 0
    for list_a in A:
        sum_num = 0
        for index, a in enumerate(list_a):
            sum_num += a * B[index]
        sum_num += C
        if sum_num > 0:
            num_of_clear += 1

    print(num_of_clear)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

B_box = []
ans = 0
count = 0


for _ in input().split():
    B_box.append(int(_))

for i in range(N):
    count_num=0
    for j in input().split():
        j = int(j) 
        count += j * B_box[count_num]
        count_num += 1
    count = count + C
    if count > 0:
        ans += 1
    count = 0
        
print(ans)

Submission status: Accepted

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


import sys
import math

# 1整数
# n = int(input())

# 空白区切り2整数
n, m, c = list(map(int, input().split()))

# 空白区切りリスト
b=list(map(int, input().split()))

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


print(ret)

Submission status: Accepted

Solution code:
Stat=input().split()
B=input().split()
ans=0
for i in range(int(Stat[0])):
    A = []
    A=input().split()
    S=0
    for j in range(int(Stat[1])):
        S=S+int(A[j])*int(B[j])
    if S+int(Stat[2]) > 0:
        ans=ans+1
print(ans)

Submission status: Accepted

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

ans = int(0)

b = [int(i) for i in input().split()]

for k in range(n):
	aaa = 0
	a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for i in range(N):
    s = 0
    for j in range(M):
        s += A[i][j]*B[j]
    if s + 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())))
ans = 0
condition = [0 for i in range(n)]
for i in range(n):
    condition[i] = 0
    for j in range(m):
        condition[i] += a[i][j]*b[j]
    condition[i] += c
print(len([i for i in condition if i > 0]))

Submission status: Accepted

Solution code:
import numpy as np
N,M,C = map(int,input().split())
B_s = np.array(list(map(int,input().split())))
A_s = []
for _ in range(N):
  A_s.append(list(map(int,input().split())))
A_s = np.array(A_s)

print(int(np.sum(np.where((np.dot(A_s,B_s)+C)>0,1,0))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,C = list(map(int, input().split()))
Bs = list(map(int, input().split()))
As = []
for _ in range(N):
    As.append(list(map(int, input().split())))
counter = 0
for n in range(N):
    if sum([a * Bs[i] for i, a in enumerate(As[n])]) + C > 0:
        counter += 1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n, m, c = map(int, input().split())
b = np.array([int(x) for x in input().split()])
a = np.array([[int(x) for x in input().split()] for y in range(n)])
ans = (np.dot(a, b) + c) > 0
print(np.count_nonzero(ans))

Submission status: Accepted

Solution code:
import numpy as np

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

cnt = 0
for i in range(N):
    A_ = np.array([int(x) for x in A[i]])
    if(np.dot(A_,B) + C > 0):
        cnt += 1

print(cnt)

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 n in range(N):
    A.append([int(x) for x in input().split(' ')])

valid_count = 0
for n in range(N):
    score = 0
    for m in range(M):
        score += A[n][m]*B[m]
    if score + C > 0:
        valid_count +=1
print(valid_count)

Submission status: Accepted

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

bl = [int(k) for k in input().split()] 
count = 0

for i in range(n):
    ans = c
    a = [int(k) for k in input().split()] 
    
    for j in range(m):
        ans += a[j] * bl[j]
    if ans > 0:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N, M, C = [int(i) for i in raw_input().split()]
B = [int(i) for i in raw_input().split()]
n = 0
for i in range(N):
	A = [int(i) for i in raw_input().split()]
	if sum(a * b for a, b in zip(A, B))+C > 0:
		n = n + 1
print(n)

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

def check(i):
    ANS=C
    for j in range(M):
        ANS+=A[i][j]*B[j]

    #print(ANS)

    if ANS>0:
        return 1
    else:
        return 0
        
    return 1

SUM=0
for i in range(N):
    SUM+=check(i)

print(SUM)

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.dot(A, B) + C > 0:
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
integer=list(map(int,input().split()))
q_list=[]
ok=0
for x in range(a):
    q_list+=[list(map(int,input().split()))]
for y in range(a):
    ans=0
    for z,p in zip(q_list[y],integer):
        ans+=z*p
    ans+=c
    if ans>0:
        ok+=1
print(ok)

Submission status: Accepted

Solution code:
def getN():
    return int(input())
def getNM():
    return list(map(int, input().split()))
def getList():
    return list(map(int, input().split()))

n,m,c = getList()
ans = 0
bnums = getList()

for i in range(n):
    tmp = 0
    anums = getList()
    for a,b in zip(anums,bnums):
        tmp += a*b

    if tmp + c > 0:
        ans += 1

print(ans)

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()] + [C])
A = np.array([[int(_) for _ in input().split()] + [1] for _0 in range(N)])
scores = A.dot(B)
print(scores[scores>0].size)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar  9 21:07:57 2019

@author: iwata
"""

N,M,C = map(int, input().split())
listb = list(map(int, input().split()))
count = 0

for i in range(N):
    num = 0
    lista = list(map(int, input().split()))
    for j in range(M):
         num = num + lista[j]*listb[j]
    num = num + C
    if num >0:
        count = count + 1     
print(count)

Submission status: Accepted

Solution code:
from operator import mul

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 j in range(n):
  if sum(list(map(mul, b, a[j])))+c > 0:
    count += 1
print(count)

Submission status: Accepted

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

    all_A = []
    clear_count = 0
    cal = 0

    for i in range(N):
        A = list(input().split(' '))
        for j in range(M):
            A[j] = int(A[j])
        all_A.append(A)

    #print(all_A)

    for A in all_A:
        cal = 0
        for i in range(M):
            cal += A[i] * B[i]
        cal += C
        #print(cal)
        if cal > 0:
            clear_count += 1

    print(clear_count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n,m,c = map(int, input().split())
b = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import numpy as np

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
B.append(C)
B_array = np.array(B).T
A = []
for i in range(N):
    a = list(map(int, input().split()))
    a.append(1)
    A.append(a)
A_array = np.array(A)

result = np.dot(A, B)
print(np.sum(result > 0))

Submission status: Accepted

Solution code:
from sys import stdin


def a(input_string):
    one = input_string[0]
    two = input_string[1]
    three = input_string[2:]
    N, M, C = [int(x) for x in one.split()]
    B = [int(x) for x in two.split()]
    temp = [string.split() for string in three]
    A = []
    for i in range(len(temp)):
        A.append([int(word) for word in temp[i]])
    #print(N, M, C)
    #print(B)
    #print(A)
    count = 0
    for i in range(N):
        product_sum = 0
        for a, b in (zip(A[i], B)):
            product_sum += a*b
        if product_sum + C > 0:
            count += 1
    return count


def main():
    input_line = stdin.readlines()
    answer = a(input_line)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(b)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# abc121_b

"""
Can you solve this?
"""

def main():
    """
    inputしたらすぐに計算して合否を判断、
    正解数を1増やす。
    """
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))

    counter = 0  # 正当数をカウントする
    temp_answer = 0

    for _ in range(N):
        temp_answer = 0
        A = list(map(int, input().split()))

        for i in range(M):
            temp_answer += A[i] * B[i]

        if temp_answer + C > 0:
            counter += 1

    print(counter)


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

Submission status: Accepted

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

import sys

def parse_input(lines_as_string = None):


    lines = []
    if lines_as_string is None:
        lines.append(input())
        tokens = lines[0].split(" ")
        n = int(tokens[0])
        m = int(tokens[1])
        c = int(tokens[2])
        lines.append(input())
        for i in range(n):
            lines.append(input())

    else:
        lines = [e for e in lines_as_string.split("\n")][1:-1]
        tokens = lines[0].split(" ")
        n = int(tokens[0])
        m = int(tokens[1])
        c = int(tokens[2])

    b = [int(e) for e in lines[1].split(" ")]
    
    a = []
    for i in range(n):
        a.append([int(e) for e in lines[i+2].split(" ")])

    return (n, m, c, b, a)


def solve(n, m, c, b, a):

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

    return count

def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
# coding: utf-8

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

M = code[1]
C = code[2]

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


ans = 0

for i in range(code[0]):
    tC = 0
    A = list(map(int, input().split(" ")))

    for j in range(M):
        tC = tC + B[j] * A[j]

    if 0 < tC + C:
        ans = 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.append(list(map(int, input().split())))

ans = 0

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

print(ans)