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

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(0, n):
    a.append([int(j) for j in input().split(" ")])

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

print(count)

Submission status: Accepted

Solution code:
A = []

N, M, C = (int(x) for x in input().split())

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

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

count = 0

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

Submission status: Accepted

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

N,M,C = map(int,input().split())
Bm = list(map(int,input().split()))
rtn=0
for i in range(N):
  Aim = list(map(int,input().split()))
  chk = C
  for j in range(M):
    chk += Aim[j]*Bm[j]
  if chk > 0:
    rtn+=1
print(rtn)

Submission status: Accepted

Solution code:
# /user/bin/python
# -*- coding: utf-8 -*-
import sys 


N,M,C = map(int, input().split())
Bn = list(map(int, input().split()))
ans = 0
for _ in range(N):
  an = list(map(int, input().split()))
  s = C
  for i in range(len(an)):
    s += an[i] * Bn[i]
  if s > 0:
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N, M, C = (int(i) for i in input().split())
B = [list(map(int, input().split()))]
AB = np.array([list(map(int, input().split())) for _ in range(N)])
aa = np.sum((B* AB), axis=1)
print(np.sum((aa+C) >= 1))

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
lst1 = [int(x) for x in input().split()]
ret = 0
for x in range(N):
    lst2 = [int(y) for y in input().split()]
    if (sum([x * y for x, y in zip(lst1, lst2)]) + C) > 0:
        ret += 1
print(ret)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]
As = []
for i in range(N):
	As.append([int(j) for j in input().split()])
cnt = 0
for item in As:
	res = 0
	for idx, elem in enumerate(item):
		res += elem * B[idx]
	res += C
	if res > 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) :
    calc = C
    for j in range(M) :
        a,b = A[i][j],B[j]
        calc += a*b
    if calc > 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):
    c = C
    for j in range(M):
        c += A[i][j]*B[j]
    if c > 0:
        ans += 1
print( ans)

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]]"):
    import numpy as np
    print(np.sum(np.dot(A, B) > -C))
    return


# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
n,m,c,*a=map(int,open(0).read().split());print(sum(sum(a[:m][t]*a[s+t]for t in range(m))+c>0for s in range(m,(n+1)*m,m)))

Submission status: Accepted

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

A_sources = []
for A_input in range(N):
  A_sources.append(map(int, raw_input().split()))

ok_source_count = 0
for i in range(N):
  i_results = []
  for j in range(M):
    i_results.append(A_sources[i][j] * B_source[j])

  check_value = sum(i_results, C)
  if check_value > 0:
    ok_source_count = ok_source_count + 1

print(ok_source_count)

Submission status: Accepted

Solution code:
def main():
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    ans = 0
    for i in range(n):
        a = list(map(int, input().split()))
        tmp = 0
        for j in range(m):
            tmp += a[j] * b[j]
        tmp += c
        if tmp > 0:
            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()))
l=[]
k,s=0,0
for i in range(N):
    l.append([int(j) for j in input().split()])
    
for i in range(N):
    for j in range(M):
        s+=l[i][j]*b[j]
    if s+C>0:
        k+=1
    s=0

print(k)

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
b = np.array(b)
a= [list(map(int, l.split())) for l in sys.stdin]
a = np.array(a)
counter = 0
for i in range(n):
    if np.dot(a[i],b.T).sum() > -c:
        counter += 1
print(counter)

Submission status: Accepted

Solution code:
import numpy as p;i=lambda:p.array(input().split(),dtype='i8');n,m,c=i();b=i()
print(sum(-c<p.dot(b,i())for _ in [0]*n))

Submission status: Accepted

Solution code:
def int_raw():
    return int(raw_input())

def ss_raw():
    return raw_input().split()

def ints_raw():
    return map(int,ss_raw())

N,M,C = ints_raw()
Bs = ints_raw()
ans = 0
for n_i in xrange(N):
    As = ints_raw()
    val = sum(map(lambda i: As[i]*Bs[i],range(M)))+C
    #print val
    if val > 0:
        ans = ans +1
print ans

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))
    ans = 0
    for _ in range(N):
        A = list(map(int, input().split()))
        tmp = C
        for i in range(M):
            tmp += A[i] * B[i]
        if tmp > 0:
            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()))
ans = 0
for i in range(n):
  A = list(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:
n, m, c = map(int, input().split())

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

result = 0
for k in range(n):
  a = list(map(int, input().split()))
  
  f = c
  for i, v in enumerate(a):
    f += v * b[i]
  
  if f > 0:
    result += 1
    
print(result)

Submission status: Accepted

Solution code:
import sys
import numpy as np

size_data = sys.stdin.readline().strip().split(" ")

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

column_vector = np.append(np.array(sys.stdin.readline().strip().split(" "), dtype=np.int64), [C])
a_matrix = []

for i in range(N):
    a_row = np.append(np.array(sys.stdin.readline().strip().split(" "), dtype=np.int64), [1])
    a_matrix.append(a_row)


a_matrix = np.array(a_matrix)
values = np.dot(a_matrix, column_vector)
results = np.where(values > 0)
result = len(results[0])

print(result)

Submission status: Accepted

Solution code:
a, b, c = [int(x) for x in input().split()]
d = [int(x) for x in input().split()]
e = [[int(x) for x in input().split()] for i in range(a)]
r = 0
for i in range(a):
    t =  sum([x * d[idx] for idx, x in enumerate(e[i])])
    if t+c > 0:
        r += 1
print(r)

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
*B, = map(int, input().split())
ans = 0
for i in range(N):
    *A, = map(int, input().split())
    ans += sum(a*b for a, b in zip(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()))

cnt = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

num = 0
for a in A:
  if sum(a * B) + C > 0:
    num += 1

print(num)

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

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

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, M, C = map(int, 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()])

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
n, m, c = map(int, input().split())
bm = list(map(int, input().split()))
data = [list(map(int, input().split())) for j in range(n)]
ac = 0
total = 0
for i in range(n):
    for k in range(m):
        total += data[i][k] * bm[k]
    total += c
    if total > 0:
        ac += 1
    total = 0
print(ac)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

def read_ints():
    return [int(i) for i in input().split()]

N, M, C = read_ints()
B = read_ints()

correct = sum(
    sum(i * j for i, j in zip(read_ints(), B)) + C > 0 
    for k in range(N)
    )

print(correct)

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

Submission status: Accepted

Solution code:
N, M, C = [int(x) for x in input().split(' ')]
B = [float(x) for x in input().split(' ')]
ALIS = []
for i in range(N):
  ta = [float(x) for x in input().split(' ')]
  ALIS.append(ta)
  
ans = 0
for i in range(N):
  s = float(C)
  for a,b in zip(ALIS[i],B):
    s += a*b
  if s > 0:
    ans+=1
  #print(s)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
  A=list(map(int,input().split()))
  tmp=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()))
    ar = [a[i] * b[i] for i in range(m)]

    if(sum(ar) + c > 0):
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import numpy as np

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

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

Submission status: Accepted

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

Submission status: Accepted

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

B=[input().split() for i in range(N+1)]

T=0
b=B.pop(0)



for a in range(N):

    su=0+C
    for c in range(M):
        x=int(B[a][c])*int(b[c])
        su+=x

        if c+1==M:
            if su>0:
                T=T+1
print(T)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = map(int, input().split())
bl = [int(i) for i in input().split()]
ans = 0
for i in range(n):
  al = [int(j) for j in input().split()]
  ans += sum([bl[j] * al[j] for j in range(m)]) + c > 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for _ in range(N):
    A = [int(a) for a 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:
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())))
count = 0
for i in range(N):
  hantei = 0
  for j in range(M):
    hantei += A[i][j]*B[j]
  if hantei + C > 0:
    count += 1
print(count)

Submission status: Accepted

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

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n,m,c = LI()
    b = LI()
    aa = [LI() for _ in range(n)]

    r = 0
    for a in aa:
        t = c
        for d,e in zip(a,b):
            t += d * e
        if t > 0:
            r += 1


    return r


print(main())

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

print(((A.dot(B) + C) > 0).sum())

Submission status: Accepted

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(n):
    pre = 0
    for k in range(m):
        pre += source[j][k]*B[k]
    else:
        if pre + C > 0:
            score += 1
print(score)

Submission status: Accepted

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

correct_answer_num = 0
for A in As:
    result = 0

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

    result += C
    if result > 0:
        correct_answer_num += 1

print("{}".format(correct_answer_num))

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 a:
  SUM = c
  for j,k in zip(i,b):
    SUM += j*k
  if SUM > 0:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
from functools import reduce

n, _, c = map(int, input().split())
bs = tuple(map(int, input().split()))

count = 0
for i in range(n):
    if reduce(
        lambda x, y: x + y[0] * y[1],
        zip(bs, map(int, input().split())),
        0,
    ) + c > 0:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy

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

correct_answer_num = 0
for A in As:
    result = 0

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

    result += C
    if result > 0:
        correct_answer_num += 1

print("{}".format(correct_answer_num))

Submission status: Accepted

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

print(count)

Submission status: Accepted

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]
  if (d > 0):
    ans+= 1

print(ans)

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginners_Contest121-B
#  TODO https://atcoder.jp/contests/abc121/tasks/abc121_b

# 20190309直接計算した方が速いので試験以内では省略
# def solveProblem(YYYYY):
#	answer = YYYYY
#	return answer


if __name__ == '__main__':
	N,M,C = map(int,input().strip().split(' '))
	blist = list(map(int,input().strip().split(' ')))
	counter = 0
	for _ in range(0,N,+1):
		saiten = 0
		alist = list(map(int,input().strip().split(' ')))
		for i in range(0,M,+1):
			saiten = saiten + blist[i]*alist[i]
		saiten = saiten + C
		if 0 < saiten :
			counter = counter + 1

	solution = counter
	print("{}".format(solution))

Submission status: Accepted

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

A=dict()
for i in range(1,N+1):
    A[i]=[int(x) for x in input().split()]

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

print(count)

Submission status: Accepted

Solution code:
import numpy as np

def read_ints():
    return [int(x) for x in input().split()]

def solve(N, M, C, b, a):
    ab = np.dot(a, b) + C
    return np.sum(ab > 0)

N,M,C = map(int, input().split())
b = np.array(read_ints(), dtype=int)
a = np.array([read_ints() for i in range(N)], dtype=int)

print(solve(N,M,C,b,a))

Submission status: Accepted

Solution code:
lx = list(map(int,input().split(" ")))
lb = list(map(int,input().split(" ")))
#la = [li[0]][li[1]]
la = []
cnt = 0

for i in range(0, lx[0]):
    tmp = lx[2]
    la.append(list(map(int,input().split(" "))))
    for j in range(0, lx[1]):
        tmp += la[i][j] * lb[j]
    if (tmp > 0):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N, M, C = map(int,input().split())
b = list(map(int,input().split()))
x=0
a=[[0]*20]*20
for i in range(N):
	a[i]=list(map(int,input().split()))
for i in range(N):
	work=0
	for h in range(M):
		work += a[i][h] * b[h]
	x += (1 if work + C > 0 else 0)
print(x)

Submission status: Accepted

Solution code:
lx = list(map(int,input().split(" ")))
lb = list(map(int,input().split(" ")))
#la = [li[0]][li[1]]
la = []
for i in range(0, lx[0]):
    la.append(list(map(int,input().split(" "))))

cnt = 0

for i in range(0,lx[0]):
    tmp = lx[2]
    for j in range(0, lx[1]):
        tmp += la[i][j] * lb[j]
    if (tmp > 0):
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    para_list = list(map(int, input().split()))
    n = para_list[0]
    m = para_list[1]
    c = para_list[2]

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

Submission status: Accepted

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

for l in ls:
    total = c
    for i in range(m):
        total += l[i] * b[i]
    if total > 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
n,m,c = map(int,input().split())
input_b = list(map(int,input().split()))
a_list=[input() for i in range(n)]
count = 0
for i in range(n):
  answer = c
  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: Accepted

Solution code:
n,m,c = map(int,input().split())
b_lis = list(map(int,input().split()))
num = 0
for i in range(n):
    to = 0
    a_lis = list(map(int,input().split()))  
    for s in range(m):
        to += a_lis[s]*b_lis[s]
        if s == m-1:
            to += c
            if to>0:
                num += 1
print(num)

Submission status: Accepted

Solution code:
import numpy as np

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

flag = 0
for n in range(N):
    sum_calc = 0
    for m in range(M):
        calc = A[n][m] * B[m]
        sum_calc+=calc
    result = sum_calc + C
    if result>0:
        flag+=1
print(flag)

Submission status: Accepted

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

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

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

R = 0
for al in ALL:
    if sum([a * b for (a, b) in zip(al, BL)]) + C > 0:
        R += 1

print(R)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar  9 22:02:12 2019

@author: yuta
"""

NMC = list(map(int,input().split()))
N = NMC[0]
M = NMC[1]
C = NMC[2]
AB = [list(map(int,input().split())) for _ in range(N+1)]

def main(n,m,c,ab):
    b = ab[0]
    count = 0
    for i in range(1,(n+1)):
        naiseki = 0
        for j in range(m):
            naiseki += b[j]*ab[i][j]
            takoushiki = naiseki + c
        if takoushiki > 0:
            count += 1
    print(count)

main(N,M,C,AB)

Submission status: Accepted

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

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

print(counter)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
ans=0
ab=[]
for i in range(n):
  a=list(map(int,input().split()))
  for j in range(m):
    ab+=[a[j]*b[j]]
ab=[sum(ab[k:k+m]) for k in range(0,len(ab),m)]
for l in range(n):
  if ab[l]+c>0:
    ans+=1
  else:
    pass
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)]
count=0
for j in A:
    ans=C
    for i in range(M):
        ans+=B[i]*j[i]
    if ans >0:
        count+=1
print(count)

Submission status: Accepted

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).sum(axis=1)+C
print((ans>0).sum())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M, C = map(int, input().split())
ans = 0
b = [int(x) for x in input().split()]
for i in range(N):
    tmp = []
    a = [int(x) for x in input().split()]
    for j in range(M):
      tmp.append(a[j] * b[j])
    if sum(tmp) + C > 0:
      ans += 1

print(ans)

Submission status: Accepted

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