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

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

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 t in a:
    Sum=0
    for i in range(m):
        Sum+=t[i]*b[i]
    if Sum+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()))
A = [list(map(int, input().split())) for _ in range(N)]

cnt = 0

for a in A:
    print(sum([ta * tb for ta, tb in zip(a, B)]) + C)
    
    if(sum([ta * tb for ta, tb in zip(a, B)]) + C > 0):
        cnt += 1

print(cnt)

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

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

print(count)

Verdicts: 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):
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def f(a):
    """
    xor [0,a]
    """
    ans = 0
    l = []
    d = 2
    while (a+1)//d > 0:
        t = (a+1)//d*(d//2)+max((a+1) % d-d//2, 0)
        ans += (t % 2)*(d//2)
        l.append(t % 2)
        d *= 2
    ans += (((a+1)-d) % 2)*(d//2)
    l.append(((a+1)-d) % 2)
    return l


def solve2(a, b):
    rb = f(b)
    ra = f(a-1)
    for i in range(len(ra)):
        rb[i] ^= ra[i]
    ans = "".join(map(str, reversed(rb)))
    print(int(ans, 2))


A, B = map(int, input().split())
if A == 0 and B == 0:
    print(0)
else:
    solve2(A, B)


# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


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()))
    s = sum([a*b for a, b in zip(A, B)])
    if s+C > 0:
        cnt += 1
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):
a=tuple(map(int,input().split()))
b=[]
for i in range(a[0]+1):
    b.append(list(map(int,input().split())))
ans=0
s=0
for j in range(a[0])[1:a[0]+1]:
    for k in range(a[1]):
        s+=b[j][k]*b[0][k]
    s+=a[2]
    if s>0:
        ans+=1
    s=0
print(ans)

a=tuple(map(int,input().split()))
b=[]
for i in range(a[0]+1):
    b.append(list(map(int,input().split())))
ans=0
s=0
for j in range(a[0])[1:a[0]]:
    for k in range(a[1]):
        s+=b[j][k]*b[0][k]
    s+=a[2]
    if s>0:
        ans+=1
    s=0
print(ans)

a=tuple(map(int,input().split()))
b=[]
for i in range(a[0]+1):
    b.append(list(map(int,input().split())))
ans=0
s=0
for j in range(a[0]+1)[1:a[0]+1]:
    for k in range(a[1]):
        s+=b[j][k]*b[0][k]
    s+=a[2]
    if s>0:
        ans+=1
    s=0
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=input().split();*B,=input().split();print(sum(sum(int(a)*int(b) for a,b in zip(i.split(),B))+int(C)>0 for i in open(0)))

N,M,C=input().split()
*B,=input().split()
print(sum(sum(int(a)*int(b) for a,b in zip(i.split(),B))+int(C)>0 for i in open(0)))

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

ans=0
for i in range(N):
    ans+=1*(sum(a*b for a,b in zip(map(int,input().split()),B))+C>0)

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


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


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

print(x)

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




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


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

b = 0
 
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
print(str(b))

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range:
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range:
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

N, M, C = map(int, input().split())                                                                                                                         
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range:
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range:
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

N, M, C = map(int, input().split())                                                                                                                         
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range:
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range:
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

N, M, C = map(int, input().split())                                                                                                                         
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range(N):
    S[i] = list(map(int, input().split()))
 
b = 0
 
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
 
print(str(b))

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

print(cnt)


NMC = list(map(int,input().split()))
N=NMC[0]
M=NMC[1]
C=NMC[2]
B=list(map(int,input().split()))
A = [list(map(int,input().split())) for l in range(N)]
cnt=0

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

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

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

# ABC121 B - Can you solve this?

n,m,c=map(int,input().split())
B = np.array(list(map(int,input().split())))
K=[]
for i in range(n):
    A = list(map(int,input().split()))
    K.append(A)

import numpy as np
pp = np.array(K)
l = (pp*B).sum(axis=1)+c

t = 0
for i in range(len(l)):
    if l[i] > 0:
        t+=1
print(t)



# ABC121 B - Can you solve this?

import numpy as np

n,m,c=map(int,input().split())
B = np.array(list(map(int,input().split())))
K=[]
for i in range(n):
    A = list(map(int,input().split()))
    K.append(A)

pp = np.array(K)
l = (pp*B).sum(axis=1)+c

t = 0
for i in range(len(l)):
    if l[i] > 0:
        t+=1
print(t)


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

import numpy as np
N,M,C = (int(j) for j in input().split())
B = [int(j) for j in input().split()]
list = [[0]* M]*N
for j in range(0,N):
        list[j] = [int(k) for k in input().split()]
count = 0
for j in range(0,N):
    if np.sum(np.array(list[j]) * np.array(B)) + C > 0:
        count = 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 operator import mul

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

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

ans = 0

for i in range(N):
  tmplist = list(map(int,input().split()))
  
  combined = list(map(mul,B_list,tmplist))
  if sum(combined)  + C >= 0:
    ans += 1

print(ans)
    

from operator import mul

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

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

ans = 0

for i in range(N):
  tmplist = list(map(int,input().split()))
  
  combined = list(map(mul,B_list,tmplist))
  print(combined)
  if sum(combined)  + C > 0:
    ans += 1

print(ans)
    

from operator import mul

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

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

ans = 0

for i in range(N):
  tmplist = list(map(int,input().split()))
  
  combined = list(map(mul,B_list,tmplist))

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

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


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


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()))
ans=0
for i in range(N):
  A=list(map(int,input().split()))
  d=0
  for j,k in zip(A,B):
    d+=A*B
  if d>-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()))
  d=0
  for j,k in zip(A,B):
    d+=j*k
  if d>-C:
    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):
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,n) :
    A = list(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if wa > 0 :
        ans += 1
print(ans)

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,n) :
    A = list(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,N) :
    A = list(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,N) :
    A = list(map(int,input().split()))
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)

Verdicts: 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):
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()))
  s=C+sum([b[j]*a[j] for j in range(m)])
  if s>0:
    cnt +=1
print(cnt)

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

res = 0
for code in codes:
    s = C    
    for i in range(M):
        s += (code[i] * b[i])
    if s > 0:
        res += 1

print(res)


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

res = 0
for code in codes:
    s = C
    
    for i in range(M):
        s += (code[i] * b[i])

    if s > 0:
        res += 1

print(res)

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

import numpy as np

n, m, c = [int(x) for x in input().split(' ')]
b = np.asarray([int(x) for x in input().split(' ')])

a = np.ndarray((n, m), dtype=np.int32)
for i in range(n):
    a[i] = [int(x) for x in input().split(' ')]


s = np.sum(a * b, axis=1)
print(np.sum(s + c > 0))


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):
from sys import stdin

N, M, C = map(int, stdin.readline().split())
B = list(map(int, stdin.readline().split()))
ans = 0
for i in range(N):
  if sum(list(map(int, stdin.readline().split())), C) > 0:
    ans += 1
    
print(ans)

from sys import stdin

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

print(ans)

from sys import stdin

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

print(ans)

Verdicts: Wrong Answer

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

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

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

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

listA = [list(map(int, input().split())) for _ in range(a)]
t=0

for i in range(a):
    ans=0
    for i in range(b-1):
        s=listB[i]*listA[i]
        s=sum(s)
        ans= ans+s
    if ans+c>0:
        t+=1
print(t)

import numpy as np

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

b=list(map(int, input().split()))
b=np.array(b)
count=0
for _ in range(M):
    a=list(map(int, input().split()))
    a=np.array(a)
    e=a*b
    d=np.sum(e,axis=0)+C
    if d>0:
        count+=1
print(count)

import numpy as np

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

b=np.array([int, input().split()])
count=0
for _ in range(M):
    a=np.array([map(int, input().split())])
    e=a*b
    d=np.sum(e,axis=0)+C
    if d>0:
        count+=1
print(count)

import numpy as np

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

b=list(map(int, input().split()))
b=np.array(b)
count=0
for _ in range(N):
    a=list(map(int, input().split()))
    a=np.array(a)
    e=a*b
    d=np.sum(e,axis=0)+C
    if d>0:
        count+=1
print(count)

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

N,M,C=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(N):
    total=C
    A=list(map(int,input().split()))
    for j in range(M):
        total+=A[j]*B[j]
    if total>0:
        count+=1
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()))
  for k in range(m):
    p = c
    p += a[k]*b[k]
    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 k in range(m):
    p += a[k]*b[k]
  if p>0: count+=1
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 = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
A = [[int(x) for x in input().split()] for i in range(N)]

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

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

count = 0
for i in range(N):
    sum = C
    for j in range(M):
        sum += A[i][j]*B[j]
    if sum>0:
        count+=1
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())
ls1 = list(map(int,input().split()))
ls2 = [list(map(int,input().split())) for i in range(n)]
print(ls1)
print(ls2)
ls = []
for i in range(n):
    a = 0
    for j in range(m):
        a += ls2[i][j]*ls1[j]
    a += c
    if a > 0:
        ls.append(1)
print(len(ls))

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

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

s,d,f = map(int,input().split())

n_ln = []
nn = []
vv = []
n_l = list(map(int,input().split()))

for i in range(s):
  n_ln.append(n_l)

for i in range(s):
  A = list(map(int,input().split()))
  nn.append(A)

X = np.array(n_ln,dtype=np.int64)
Y = np.array(nn,dtype=np.int64)
Z = X*Y

col_sum = np.prod(Z, axis=1)

def calc_(n):
    return n + f
  
data = calc_(col_sum)


count= 0

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

print(count)

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

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

def solve(a,b,c):
    val = 0
    for ia,ib in zip(a,b):
        val += ia*ib
    val += c
    return val > 0

cnt = 0
for i in range(n):
    a = list(map(int,input().split())
    if solve(a,b,c):
        cnt += 1

print(cnt)    

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

def solve(a,b,c):
    val = 0
    for ia,ib in zip(a,b):
        val += ia*ib
    val += c
    return val > 0

cnt = 0
for i in range(n):
    a = list(map(int,input().split()))
    if solve(a,b,c):
        cnt += 1

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


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

n,m,c = map(int,input().split())
b = [i for i in map(int,input().split())]
a = []
for j in range(n):
    a.append( [i for i in map(int,input().split())] )


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

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
result = 0
for i in range(N):
  D = 0
  A = list(map(int,input().split()))
  for j in range(M):
    D += B[j]*A[j]
  if D+C> 0:
    result += 1
  else:
    None
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()))
a = [list(map(int, input().split())) for _ in range(n)]
x = -c
lst = []
tmp = 0

for i in range(n):

    for j in range(m):
        x += a[i][j]*b[j]
    lst.append(x)

for i in range(n):
    if lst[i] > 0:
        tmp += 1

print(tmp)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
lst = []
tmp = 0

for i in range(n):
    
    x = -c
    for j in range(m):
        x += a[i][j]*b[j]
    lst.append(x)

for i in range(n):
    if lst[i] > 0:
        tmp += 1

print(tmp)

n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
lst = []
tmp = 0

for i in range(n):
    
    x = c
    for j in range(m):
        x += a[i][j]*b[j]
    lst.append(x)

for i in range(n):
    if lst[i] > 0:
        tmp += 1

print(tmp)

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

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


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

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

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

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 = map(int, input().split())
A = [[0 for i in range(M)] for j in range(N)]

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

N,M,C = map(int, input().split())
B = map(int, input().split())
A = []

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

ans = 0

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

print(ans)


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

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

ans = 0

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

print(ans)


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

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

ans = 0

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

print(ans)


N,M,C = map(int, input().split())
B = map(int, input().split())
A = []

for i in range(20):
	A.append(map(int, input().split()))

ans = 0

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

print(ans)


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

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

ans = 0

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

print(ans)


Verdicts: Wrong Answer

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

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
B = np.array(B)
A = []
for n in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = np.array(A, dtype=int)
B_new = np.array([B, B])
count = 0
for i in range(N):
  score = A[i] * B
  if score.sum() > C:
    count += 1


print(count)

import numpy as np

N, M, C = map(int, input().split())
B = list(map(int, input().split()))
B = np.array(B)
A = []
for n in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = np.array(A, dtype=int)
count = 0
for i in range(N):
  score = np.dot(A[i], B)
  if score > -C:
    count += 1


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())
A=[list(map(int,input().split())) for _ in range(N)]
print(len([i for i in range(N) if sum([A[i][j] for j in range(M)]) + C > 0]))

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

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

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

ans = 0


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

Verdicts: Wrong Answer

Accepted