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 = (int(x) for x in input().split())
b=list(map(int,input().split()))
ans=0

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

print(ans)

Submission status: Accepted

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

s = 0

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

print(s)

Submission status: Accepted

Solution code:
import math
a,b,c= map(int,input().split())
d = list(map(int,input().split()))
answer = 0
e = [list(map(int,input().split()))for i in range(a)]
for i in range(a):
    g = 0
    for j in range(b):
        g += e[i][j]*d[j]
    g += c
    if g>0:
        answer += 1
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, c = [int(x) for x in input().split()]
bm = [int(x) for x in input().split()]
count = 0
source = 0

for i in range(n):
    tup_data = [int(x) for x in input().split()]
    #print(tup_data,end=":")
    
    for j in range(m):
        source += bm[j]*tup_data[j]
    #print(source + c)
    if source+c > 0:
        count += 1
    
    tup_data = []
    source = 0

print(count)

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

Submission status: Accepted

Solution code:
import numpy as np
n,m,c = map(int, input().split())
b = np.array(list(map(int, input().split())))
cnt = 0
for _ in range(n):
    a = np.array(list(map(int, input().split())))
    if np.sum(b*a) + 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 _ in range(N):
    A.append(list(map(int, input().split())))

ans = 0
for a in A:
    allsum = C
    for x, y in zip(a, B):
        allsum += x*y
    if allsum > 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(i) for i in input().split()])
A=np.array([[int(i) for i in input().split()] for j in range(N)])

ans=np.count_nonzero(np.dot(A,B)>-C)
print(ans)

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

Submission status: Accepted

Solution code:
def main():
    n, m, c = map(int, input().split())
    b_lst = list(map(int, input().split()))
    a_lst = [0] * n
    for i in range(n):
        a_lst[i] = list(map(int, input().split()))

    count = 0
    for i in range(n):
        ab = 0
        for j in range(m):
            ab += a_lst[i][j] * b_lst[j]
        abc = ab + c

        if abc > 0:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, m, c = [int(num) for num in lines.pop(0).split(" ")]
b_list = [int(num) for num in lines.pop(0).split(" ")]
def iter_a_list():
    for line in lines:
        yield [int(num) for num in line.split(" ")]

ans = 0
for a_list in iter_a_list():
    value = sum(a * b for a, b in zip(a_list, b_list))
    if value + c > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

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

print(res)

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 += A[j] * B[j]

    if sum > 0:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 0

for A in As:
    ans += sum(a*b for a,b in zip(A, B)) + 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 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:
n,m,c = map(int, input().split())

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

ans = 0

for i in range(n):
    total = 0
    a = list(map(int, input().split()))
    for j in range(m):
        total += a[j]*b[j]
    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()))

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

print(cnt)

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

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

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,M,C = MI()
B = LI()
ans = 0
for i in range(N):
    A = LI()
    a = C
    for j in range(M):
        a += A[j]*B[j]
    if a > 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()))
  delta = 0
  for j in range(m):
    delta += a[j]*b[j]
  delta += c
  if delta > 0:
    ans += 1
  else:
    continue
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(n):
  la = list( map(int, input().split()) )
  s = c
  for i in range(m):
    s += la[i] * lb[i]
  if s > 0:
    t += 1

print(t)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M, C = LI()
    B = LI()
    A = [LI() for _ in range(N)]

    ans = len([i for i in A if sum([i[j] * B[j] for j in range(M)]) + C > 0])
    print(ans)

if __name__ == '__main__':
    resolve()

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

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()))
  if sum([a*b for a,b in zip(A,B)])+c > 0:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
import math


def resolve():
    import sys
    input = sys.stdin.readline
    row1 = [int(x) for x in input().rstrip().split(" ")]
    n = row1[0]
    c = row1[2]

    ans = 0
    b_list = [int(x) for x in input().rstrip().split(" ")]
    for _ in range(n):
        a_list = [int(x) for x in input().rstrip().split(" ")]

        if sum([a*b for a, b in zip(a_list, b_list)]) + c > 0:
            ans += 1

    print(ans)





if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for A_list in A_lists:
    tmp = [a * b for a, b in zip(A_list, B_list)]
    tmp = sum(tmp) + C
    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()))
A=[0]*N
for i in range(N):
  A[i]=list(map(int,input().split()))
sum=[0]*N
count=0
for i in range(N):
  for j in range(M):
    sum[i]+=A[i][j]*B[j]
  sum[i]+=C
  if sum[i]>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)]

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
# B - Can you solve this?
#行列の入力方法を習得する 2020/08/07
N,M,C = map(int,input().split())
B = list(map(int,input().split()))

'''
A = []
for o in range(N):#文字列の行列を入力
    a = input().split()
    A.append(a)
print(A)

A_list = []
for p in range(N):
    box = []
    for q in range(M):
        aa = int(A[p][q])
        box.append(aa)
    A_list.append(box)
print(A_list)
'''
A_list = []#任意の列数の行列の入力
for o in range(N):
    A = list(map(int, input().split()))
    A_list.append(A)
    
count = 0
for i in  range(N):
    judge = C
    for j in range(M):
        judge += A_list[i][j]*B[j]
    if judge > 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N, M ,C = map(int, input().split())
B = list(map(int, input().split()))
n = 0
for i in range(N):
    a = list(map(int, input().split()))
    AB = [x * y for (x, y) in zip(a,B)]

    if sum(AB) > -C:
        n += 1

print(n)

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, m, c = inintm()
B = inintl()
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import numpy as np

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n, m, c = nm()
    B = np.array(nl())
    ans = 0
    for i in range(n):
        A = np.array(nl())
        if np.sum(A * B) + c > 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()))
    cnt = 0
    for j in range(m):
        cnt += a[j]*b[j]
        
    if cnt + 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(i) for i in input().split()])
a = np.array([[int(i) for i in input().split()] for _ in range(n)])

res = 0
for aa in a:
    if np.sum(aa*b)+c > 0:
        res += 1
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, m, c = [int(i) for i in input().split()]
    B = [int(i) for i in input().split()]
    sourcecode = [[int(i) for i in input().split()] for _ in range(n)]
    ans = 0
    for A in sourcecode:
        _sum = 0
        for i in range(m):
            _sum += A[i] * B[i]
        if _sum > -c:
            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()))
cnt = 0
for _ in range(n):
    a = list(map(int, input().split()))
    if sum(i*j for i, j in zip(a, b)) + c > 0:
        cnt += 1 
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(res)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import bisect
import heapq
from collections import deque


def input():
    return sys.stdin.readline().rstrip()


def sump(x, y, z, t):
    ans = z
    for i in range(t):
        ans += x[i] * y[i]

    return ans

def main():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))
    count =0
    for j in range(N):
        A = list(map(int,input().split()))
        if sump(A,B,C,M) >0:
            count +=1

    print(count)

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

Submission status: Accepted

Solution code:
f=lambda:[*map(int,input().split())]
n,m,c=f()
l=f()
print(sum(sum(a*b for a,b in zip(f(),l))>-c for _ in range(n)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f=lambda:[*map(int,input().split())]
n,m,c=f()
l=f()
a=0
for _ in range(n):
  t=sum(a*b for a,b in zip(f(),l))
  if t+c>0: a+=1
print(a)

Submission status: Accepted

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

B = []
b = list(map(int, input().split()))

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

results = [[sum(a*b for a,b in zip(x_row, b))] for x_row in A]

working = 0
for result in results:
    if ((result[0] + C) > 0):
        working += 1

print(working)

Submission status: Accepted

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

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 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 main():
    n, m, c = LI()
    B = LI()
    cnt = 0
    for i in range(n):
        A = LI()
        tmp = c
        for i, a in enumerate(A):
            tmp += B[i] * a
        if tmp > 0:
            cnt += 1
    print(cnt)


main()

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

Submission status: Accepted

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

res = 0
c = -C

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

    if t > c:
        res += 1

print(res)

Submission status: Accepted

Solution code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for _ in range(n):
  result=c
  a=list(map(int,input().split()))
  for i,j in zip(a,b):
    result+=i*j
  if result>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 = [list(map(int,input().split())) for _ in range(N)]

correct = 0
for A in A_list:
    sum_ab = C
    for a, b in zip(A, B):
        sum_ab += a*b
    if sum_ab > 0:
        correct += 1

print(correct)

Submission status: Accepted

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

# from numba import njit

# from collections import Counter
# from itertools import accumulate
# import numpy as np
# from heapq import heappop,heappush
# from bisect import bisect_left

# @njit
def solve(n,m,c,a,b):
  res = 0
  for i in range(n):
    res += sum(a[i][j]*b[j] for j in range(m)) + c > 0
  return res



def main():
  N,M,C = map(int,input().split())
  B = list(map(int,input().split()))
  A = [list(map(int,input().split())) for _ in range(N)]
  print(solve(N,M,C,A,B))
  return

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

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

Solution code:
MM = input().split()
N = int(MM[0])
M = int(MM[1])
C = int(MM[2])
count= 0
BB = input().split()
for i in range(N):
  AA = input().split()
  total = C
  for i,j in zip(BB,AA):
    
    total += int(i)*int(j)
  
  if total >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 _ in range(n)]
ans = 0
for i in range(n):
    sm = c
    for j in range(m):
        sm += a[i][j]*b[j]

    if sm > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
from operator import mul
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()))
    com = map(mul, a, b)
    if sum(com) + c > 0:
        count += 1
    a.clear()

print(count)

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

Submission status: Accepted

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

count = 0
for A in A:
    ans = C
    for a, b in zip(A, B):
        ans += a * b
    if ans > 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
n, m, c = [int(x) for x in input().split()]
bb = [int(x) for x in input().split()]
a = [list(map(int, input().split())) for _ in range(n)]

result = 0
for ae in a:
  tmp = sum([a*b for a, b in zip(ae, bb)]) + c
  if tmp > 0:
    result += 1

print(result)

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

Solution code:
import numpy

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

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

Submission status: Accepted

Solution code:
# abc121_b.py
# https://atcoder.jp/contests/abc121/tasks/abc121_b

# B - Can you solve this? /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# N個のソースコードがあり、i 個目のソースコードの特徴は Ai1,Ai2,...,AiM の M個の整数で表されます。
# また、整数 B1,B2,...,BMと 整数 Cが与えられます。
# Ai1B1+Ai2B2+...+AiMBM+C>0のときに限り、i個目のソースコードはこの問題に正答するソースコードです。
# N個のソースコードのうち、この問題に正答するソースコードの個数を求めてください。

# 制約

#     入力は全て整数である。
#     1≤N,M≤20
#     −100≤Aij≤100
#     −100≤Bi≤100
#     −100≤C≤100

# 入力

# 入力は以下の形式で標準入力から与えられる。
# N M C
# B1 B2 ... BM
# A11 A12 ... A1M
# A21 A22 ... A2M
# ⋮
# AN1 AN2 ... ANM

# 出力
# N個のソースコードのうち、この問題に正答するソースコードの個数を出力せよ。

# 入力例 1
# 2 3 -10
# 1 2 3
# 3 2 1
# 1 2 2

# 出力例 1
# 1

# 以下のように 2個目のソースコードのみがこの問題に正答します。

#     3×1+2×2+1×3+(−10)=0≤0なので 1個目のソースコードはこの問題に正答しません。
#     1×1+2×2+2×3+(−10)=1>0なので 2個目のソースコードはこの問題に正答します。

# 入力例 2
# 5 2 -4
# -2 5
# 100 41
# 100 40
# -3 0
# -6 -2
# 18 -13

# 出力例 2
# 2

# 入力例 3
# 3 3 0
# 100 -100 0
# 0 100 100
# 100 100 100
# -100 100 100

# 出力例 3
# 0

# 全て Wrong Answer です。あなたのソースコードは含めません。


def calculation(lines):
    # line = lines[0]
    # N = int(lines[0])
    N, M, C = list(map(int, lines[0].split()))
    values_b = list(map(int, lines[1].split()))
    # values = list(map(int, lines[1].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i+1]))
    valueses = list()
    for i in range(N):
        valueses.append(list(map(int, lines[i+2].split())))

    cnt = 0

    for values in valueses:
        sm = C
        for i in range(M):
            sm += values_b[i] * values[i]
        if sm > 0:
            cnt += 1

    return [cnt]


# 引数を取得
def get_input_lines():
    line = input()
    N, M, C = list(map(int, line.split()))
    lines = list()
    lines.append(line)
    for _ in range(N+1):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2 3 -10', '1 2 3', '3 2 1', '1 2 2']
        lines_export = [1]
    if pattern == 2:
        lines_input = ['5 2 -4', '-2 5', '100 41', '100 40', '-3 0', '-6 -2', '18 -13']
        lines_export = [2]
    if pattern == 3:
        lines_input = ['3 3 0', '100 -100 0', '0 100 100', '100 100 100', '-100 100 100']
        lines_export = [0]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for _ in range(M)]

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

print(ans)