| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1061599 | Energi | Preokret (COCI18_preokret) | Cpython 3 | 65 ms | 3168 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.
As_Bs = [[], []]
ballAB = [0, 0]
for i in range(len(As_Bs)):
    A_B = int(input())
    for time in range(A_B):
        As_Bs[i].append(int(input()))
    As_Bs[i].sort()
s = As_Bs[0] + As_Bs[1]
s.sort()
grade = 0
for i in range(len(s)):
    if s[i] >= 1440:
        grade = len(s[:i])
        break
progress = 0
w = ''
for i in range(len(s)):
    if i == 0 and As_Bs[0].count(s[i]):
        w += 'A'
    elif i == 0 and As_Bs[1].count(s[i]):
        w += 'B'
    if As_Bs[0].count(s[i]):
        ballAB[0] += 1
    elif As_Bs[1].count(s[i]):
        ballAB[1] += 1
    if ballAB[1] != 0 and ballAB[0] > ballAB[1] and w == 'B':
        progress += 1
        w = 'A'
    elif ballAB[0] != 0 and ballAB[1] > ballAB[0] and w == 'A':
        progress += 1
        w = 'B'
print(grade, progress, sep= '\n')
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
