# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
205218 | boolodifjenula | Baza (COCI17_baza) | Cpython 3 | 625 ms | 36272 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
x,y=map(int,input().split())
L=[]
for i in range(x):
L+=[list(map(int,input().split()))]
q=int(input())
for i in range(q):
M=list(map(int,input().split()))
b=0
for j in range(x):
t=1
for c in range(y):
if M[c]==L[j][c] or M[c]==-1:
continue
else:
t=0
break
if t: b+=1
print(b)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |