# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
156973 | dcj | Preokret (COCI18_preokret) | Cpython 3 | 33 ms | 3716 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.
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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |