Submission #156973

#TimeUsernameProblemLanguageResultExecution timeMemory
156973dcjPreokret (COCI18_preokret)Cpython 3
2 / 50
33 ms3716 KiB
A=int(input()) a=[0]*2880 b=[0]*2880 s=0 x=0 p=0 pol=0 s=int(input()) xa=s if s<=1440: pol+=1 a[s-1]=1 for i in range(A-1): s=int(input()) if s<=1440: pol+=1 a[s-1]=1 B=int(input()) s=int(input()) xb=s if s<=1440: pol+=1 b[s-1]=1 if xa<xb: x=1 else: x=2 for i in range(B-1): s=int(input()) if s<=1440: pol+=1 b[s-1]=1 for i in range(2880): if a[i]==1: A-=1 if b[i]==1: B-=1 if A<B and x==2: p+=1 x=1 elif B<A and x==1: p+=1 x=2 print(pol) print(p)
#Verdict Execution timeMemoryGrader output
Fetching results...