Submission #156973

# Submission time Handle Problem Language Result Execution time Memory
156973 2019-10-08T17:07:17 Z dcj Preokret (COCI18_preokret) Python 3
2 / 50
33 ms 3716 KB
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
1 Partially correct 27 ms 3716 KB Output is partially correct
2 Partially correct 27 ms 3556 KB Output is partially correct
3 Partially correct 27 ms 3368 KB Output is partially correct
4 Partially correct 27 ms 3332 KB Output is partially correct
5 Partially correct 27 ms 3428 KB Output is partially correct
6 Partially correct 29 ms 3428 KB Output is partially correct
7 Partially correct 32 ms 3428 KB Output is partially correct
8 Partially correct 32 ms 3332 KB Output is partially correct
9 Partially correct 33 ms 3340 KB Output is partially correct
10 Partially correct 26 ms 3428 KB Output is partially correct