# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
161504 | boolodifjenula | Preokret (COCI18_preokret) | Cpython 3 | 49 ms | 3468 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
A=int(input())
As=[int(input()) for i in range (A)]
B=int(input())
k=0
Bs=[]
Ak=0
Bk=0
v1=5
c=0
for i in range (A+B):
if i<B:
Bs+=[int(input())]
if Bs[i-Bk]<=24*60:
k+=1
if i<A and As[i-Ak]<=24*60:
k+=1
if As and min(As[0],Bs[0]) in As:
Ak+=bool(As.pop(0))
elif Bs:
Bk+=bool(Bs.pop(0))
if Ak>Bk:
v=1
elif Bk>Ak:
v=0
if v!=v1:
c+=1
v1=v
print(k)
print(c-1)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |