TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N, M, C = map(int, input().split())
B=list(map(int, input().split))


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

N, M, C = map(int, input().split())
B=list(map(int, input().split()))
answer=0
sum=0  


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

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


N, M, C = map(int, input().split())
B=list(map(int, input().split))
answer=0
sum=0  


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

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


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

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


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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
import sys

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

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

print(ans)


import sys

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

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

print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
n, m, c = map(int, input.split())
b = list(map(int, input.split()))
ans = 0
code = 0

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

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

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

print(ans)


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

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

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

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


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

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


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
n, m, c = list(map(int ,input().split()))
b = list(map(int ,input().split()))
A = []
for i in range(n):
    A.appened(list(map(int ,input().split())))
count = 0
for i in range(n):
    sum = 0
    for j in range(m):
        sum += (b[m] * A[n][m])
    if sum + c > 0:
        count += 1
print(count)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N, M, C = map(int input().split())
B = list(map(int input().split()))
A = [list(map(int input().split())) for i in range(N)]
M = list(range(N))
x = 0
for i in M:
    M[i] = A[i] * B[I] + C
    if M[i] > 0:
        x +=
print(x)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
	if 0 < C + reduce(lambda acc, p: acc + p[0]*p[1], zip(map(int, input().split()), B), 0):
		count += 1
print(count)


from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
  	if 0 < C + reduce(lambda p: p[0]*p[1], zip(map(int, input().split()), B)):
    	count += 1
print(count)

from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
  	if 0 < C + reduce(lambda p: p[0]*p[1], zip(map(int, input().split()), B)):
        count += 1
print(count)

from functools import reduce
N, M, C = map(int, input().split())
*B, = map(int, input().split())
count = 0
for _ in range(N):
	if 0 < C + reduce(lambda acc, p: acc + p[0]*p[1], zip(map(int, input().split()), B), 0):
		count += 1
print(count)


Verdicts: Wrong Answer

Runtime Error

Runtime Error

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

Submission attempts (in order):
def main():
    n,m,c = tuple([int(t)for t in input().split()])
	b = tuple([int(t)for t in input().split()])
    
    ans = 0
    for _ in [0]*n:
      	t = tuple([int(t)for t in input().split()])
        v = c
		for i in range(m):
            v+=b[m]*t[m]
        if v>0:
          ans+=1
    print(ans)
if __name__ == "__main__":
    main()

def main():
    n,m,c = tuple([int(t)for t in input().split()])
    b = tuple([int(t)for t in input().split()]) 
    ans = 0
    for _ in [0]*n:
      t = tuple([int(t)for t in input().split()])
      v = c
      for i in range(m):
        v+=b[i]*t[i]
      if v>0:
          ans+=1
    print(ans)
if __name__ == "__main__":
    main()


Verdicts: Runtime Error

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

Submission attempts (in order):
import numpy as np
from operator import mul
from functools import reduce

N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
#A = np.array([[0]*M,N])
A = np.empty((N,M))

result = np.array([])
count = 0

for n in range(N):
    A[n] = [int(m) for m in input().split()]
    result = A[n-1] * B
    #print(result)
    if sum(result)+C > 0:
        count +=1
print(count)


import numpy as np

N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
A = np.empty((N,M))

count = 0
for n in range(N):
    A[n] = [int(m) for m in input().split()]
    count += (sum(A[n] * B)+C > 0)
print(count)


Verdicts: Wrong Answer

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

Submission attempts (in order):
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()))
  p=C
  for j in range(M):
    P+=A[j]*B[j]
    if p>0:
      count+=1
print(count)

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

Verdicts: Runtime Error

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

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


if __name__ == '__main__':
    solve()


def solve():
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]
    s = 0
    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)


if __name__ == '__main__':
    solve()


Verdicts: Wrong Answer

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

Submission attempts (in order):
N, M = list(map(int, input().split()))
K, A = [0] * N, [0] * N
for i in range(N):
    K[i], *A[i] = list(map(int, input().split()))
k = set(i for i in range(1, M + 1))
ki = k.intersection(*A)
print(len(ki))

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C=map(int, input().split())
B=list(map(int(input().split())))
cnt=0

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


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

Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C=map(int, input().split())
B=list(map(int, input().split()))
A=[list(map(int, input().split())) for n in range(N)]

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

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

print(co)

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

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

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

print(co)

Verdicts: Runtime Error

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

Submission attempts (in order):
n, m, c = [int(i) for i in input().split()]
bs = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    a_list = [int(i) for i in input().split()]
    cond = sum(a+b for a, b in zip(a_list, bs)) + c
    if cond > 0:
        ans += 1

n, m, c = [int(i) for i in input().split()]
bs = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    a_list = [int(i) for i in input().split()]
    cond = sum(a+b for a, b in zip(a_list, bs)) + c
    if cond > 0:
        ans += 1
print(ans)

n, m, c = [int(i) for i in input().split()]
bs = [int(i) for i in input().split()]
ans = 0
for _ in range(n):
    a_list = [int(i) for i in input().split()]
    cond = sum(a*b for a, b in zip(a_list, bs)) + c
    if cond > 0:
        ans += 1
print(ans)


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [ list(map(int,input().split())) for _ in range(N) ]

ans = 0
for a,b in A,B:
  ans += 1 if sum([i*j for i,j in a,b])+C>0
 print(ans)

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

Verdicts: Runtime Error

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

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

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

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

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

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)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
# -*- coding: utf-8 -*-
import numpy as np
N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64)
ans = 0
for _ in range(N):
    A = np.array(inpl(), dtype=np.int64)
    ans += np.sum(A*B)+C > 0
print(ans)

# -*- coding: utf-8 -*-
import numpy as np
def inpl(): return list(map(int, input().split()))
N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64)
ans = 0
for _ in range(N):
    A = np.array(inpl(), dtype=np.int64)
    ans += np.sum(A*B)+C > 0
print(ans)


Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C= map(int,input().split())
B= list(map(int,input().split()))
now = 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:
        now += 1
print(now)


N,M,C= map(int,input().split())
B= list(map(int,input().split()))
now = 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:
        now += 1
print(now)


Verdicts: Runtime Error

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

Submission attempts (in order):
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 i,j in zip(B,A):
    tmp += i*j
  if tmp > C:
    ans += 1
print(ans)

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 i,j in zip(B,A):
    tmp += i*j
  if tmp + C > 0:
    ans += 1
print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
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):
  if sum(a[i]) + c > 0:
    ans += 1
print(ans)

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
n,m,c=map(int,input().split())
b_l=list(map(int,input().split()))

cnt=0
for i in range(n):
            a_l_i = list(map(int,input().split()))
            c_l = 0
            for j in range(m-1):
                        c_l += a_l_i[j] * b_l[j]
            last_ = c_l - c
            if last_>0:
                        cnt+=1
print(cnt)                        
                        




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

cnt=0
for i in range(n):
            a_l_i = list(map(int,input().split()))
            c_l = 0
            for j in range(m):
                        c_l += a_l_i[j] * b_l[j]
            last_ = c_l + c

            if last_>0:
                        cnt+=1
print(cnt)                        
                        




Verdicts: Wrong Answer

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

Submission attempts (in order):
n,m,c=map(int, input().split())
b=list(map(int, input().split()))

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
n,m,c = map(int,input().split())
B = map(int,input().split())
A = []
ans = 0
for i in range(m):
  a = map(int,input().split())
  A.append(a)

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C=map(int,input().split())
B=list(input().split())
right_answer=0
for i in range(N):
  A=list(input().split())
  if sum(a*b for a,b in zip(A,B))+C>0:
    right_answer+=1
print(right_answer)

N,M,C=map(int,input().split())
B=list(map(int,input().split()))
right_answer=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:
    right_answer+=1
print(right_answer)

Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C = map(int,input().split())
B = input().split()
Anm = []
for i in range(N):
    Anm.append(input().split())
cont = 0
for A in Anm:
    c = 0
    for i in range(M):
        c += int(A[i]) * int(B[i])
    if c > 0:
        cont += 1
print(cont)

N,M,C = map(int,input().split())
B = input().split()
Anm = []
for i in range(N):
    Anm.append(input().split())
cont = 0
for A in Anm:
    c = C
    for i in range(M):
        c += int(A[i]) * int(B[i])
    if c > 0:
        cont += 1
print(cont)

Verdicts: Wrong Answer

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

Submission attempts (in order):
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()

#    A[i] = input()


#a = list()

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


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

#    A[i] = input()


#a = list()

#    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(arrA)
#print(D)
#print(E)
#print(F)
print(t)


Verdicts: Wrong Answer

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

Submission attempts (in order):
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 = len(
    row
    for row in A
    if C + sum([x * y for x, y in zip(row, B)]) > 0
)

print(result)

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)

Verdicts: Runtime Error

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

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

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



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

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

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

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



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)



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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

cnt = 0

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

print (cnt)


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

cnt = 0

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

print (cnt)


Verdicts: Wrong Answer

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

Submission attempts (in order):
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)

N, M, C = map(int, input().split())
b = [map(int, 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)

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)

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
B=np.array(b)
count=0
for i in range(n):
    A=np.array(list(map(int,input().split())))
    S=np.dot(B,A) + c
    if(S>0):
        count+=1
print(count)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
s = list(map(int, input().split()))
N = i[0]
M = i[1]
C = i[2]
B = list(map(int, input().split()))
x = 0
for i in range(N):
  k = C
  A = list(map(int, input().split()))
  for j in range(M):
    k = k + A[j] * B[j]
  if k > 0:
    x = x + 1
  else:
    pass
print(x)  

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


Verdicts: Runtime Error

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

Submission attempts (in order):
N, M, C = map(int, input().split())
Bli = list(map(int,input().split()))
Ali = [list(map(int, input().split())) for _ in range(N)]

ans = 0

for A in Ali:
    sumNum = 0
    for num, a in enumerate(A):
        sumNum += a * Bli[num]
        
    print(sumNum)
    if sumNum + C > 0:
        ans += 1

print(ans)


N, M, C = map(int, input().split())
Bli = list(map(int,input().split()))
Ali = [list(map(int, input().split())) for _ in range(N)]

ans = 0

for A in Ali:
    sumNum = 0
    for num, a in enumerate(A):
        sumNum += a * Bli[num]
        
    if sumNum + C > 0:
        ans += 1

print(ans)


Verdicts: Wrong Answer

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A=[]
for i in range(N):
  A.append([int(i) in i for input().split()])
ans=0
for a in A:
  asum=0
  for i in range(M):
    asum+=A[i]+B[i]
  asum+=C
  if asum > 0:
    ans+=1
print(ans)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
 import numpy as np
N, M ,C = map(int, input().split())
a = []
for i in range(N+1):
    a.append(list(map(int, input().split())))
all = np.array(a)
sum = 0
num = 0

for i in range(N):
    mul = np.sum(all[0] * all[i+1]) + C
    if mul > 0:
        num += 1
    mul = 0

print(num)

import numpy as np
N, M ,C = map(int, input().split())
a = []
for i in range(N+1):
    a.append(list(map(int, input().split())))
all = np.array(a)
sum = 0
num = 0

for i in range(N):
    mul = np.sum(all[0] * all[i+1]) + C
    if mul > 0:
        num += 1
    mul = 0

print(num)

Verdicts: Runtime Error

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

Submission attempts (in order):
import numpy as np
n,m,c=map(int,input().split())
b=list(map(int,input ().split()))
num=0
for i in range(n):
  a=list(map(int,input().split()))
  hoge=np.dot(b*a)+c
  if hoge>0:
    num+=1
print(num)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
H,W = [int(i) for i in input().split()]

h1 = H//2
h2 = H-h1

w2 = W//2
w1 = W-w2

if H==1 or W==1:
  print(1)
else:
  print(h2*w1+h1*w2)

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

rez = [0]*N

for i in range(M):
  for j in range(N):
    rez[j] += B[i]*A[j][i]

count = 0
for i in rez:
  if i+C>0:
    count+=1
print(count)

Verdicts: Runtime Error

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

Submission attempts (in order):
base_data = list(map(int,input().split()))
line = base_data[0]
num = base_data[1]
last_num = base_data[2]

elements = 0
result = 0

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

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

print(result)

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

elements = 0
result = 0

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

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

  if elements + last_num > 0:
    result += 1
    
print(result)

Verdicts: Wrong Answer

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
N, M, C = [int(_) for _ in input().split()]
B = [int(_) for _ in input().split()]
A = [[int(_) for _ in input().split()] for _ in range(N)]
ans = 0
for i in range(N):
    correct = True
    for j in range(M):
        if B[j] != A[i][j]:
            correct = False
            break
    if correct:
        ans += 1
print(ans)


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


Verdicts: Wrong Answer

Accepted