Submission #161853

#TimeUsernameProblemLanguageResultExecution timeMemory
161853boolodifjenulaBaza (COCI17_baza)Cpython 3
50 / 50
625 ms36124 KiB
N,M=map(int,input().split()) L=[] for i in range(N): L+=[list(map(int,input().split()))] Q=int(input()) R=Q*[0] for x in range (Q): Z=list(map(int,input().split())) for y in range(N): for z in range(M): if Z[z]!=-1 and Z[z]!=L[y][z]: break if z==M-1: R[x]+=1 for i in range(Q): print(R[i])
#Verdict Execution timeMemoryGrader output
Fetching results...