| Task: | Babaza Game |
| Sender: | aalto26am_050 |
| Submission time: | 2026-08-31 17:44:05 +0300 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.06 s | details |
| #2 | RUNTIME ERROR | 0.06 s | details |
| #3 | RUNTIME ERROR | 0.06 s | details |
| #4 | RUNTIME ERROR | 0.06 s | details |
| #5 | RUNTIME ERROR | 0.06 s | details |
| #6 | RUNTIME ERROR | 0.06 s | details |
| #7 | RUNTIME ERROR | 0.06 s | details |
| #8 | RUNTIME ERROR | 0.06 s | details |
| #9 | RUNTIME ERROR | 0.06 s | details |
| #10 | RUNTIME ERROR | 0.08 s | details |
| #11 | RUNTIME ERROR | 0.06 s | details |
| #12 | RUNTIME ERROR | 0.06 s | details |
| #13 | RUNTIME ERROR | 0.06 s | details |
| #14 | RUNTIME ERROR | 0.06 s | details |
Code
from functools import cmp_to_key
if __name__ == "__main__":
n = int(input())
lr = []
lmin = 1
rmax = 1
for i in range(n):
inp = input().split(" ")
l = int(inp[0])
lmin = min(l, lmin)
r = int(inp[1])
rmax = max(r, rmax)
lr.append((l,r))
def s(lr1, lr2):
if lr1[0]<lr2[0]:
return -1
if lr1[0]>lr2[0]:
return 1
if lr1[1]<lr2[1]:
return -1
if lr1[1]>lr2[1]:
return 1
return 0
lr = sorted(lr, key=cmp_to_key(s))
ma = 0
current = 0
i = lmin
rs = [0] * (rmax + 1)
for l, r in lr:
rs[r] += 1
if i != l:
for idx in range(i, l):
current -= rs[idx]
i = l
current += 1
ma = max(current, ma)
print(ma)Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| A B |
| correct output |
|---|
| A B |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'A'Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| BABAZA BACBCB |
| correct output |
|---|
| BABAZA BACACA BACBCB |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'BABAZA'Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| AB BA |
| correct output |
|---|
| AB CB CA BA |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'AB'Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| ABC BCD |
| correct output |
|---|
| ABC DBD DCD BCD |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'ABC'Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| AXYB CXYD |
| correct output |
|---|
| AXYB CXYD |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'AXYB'Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| LMIJLF PAQBMH |
| correct output |
|---|
| LMIJLF PMQJMF PAQBMH |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'LMIJLF'Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| PNIWLSLIH CRLVPUFHD |
| correct output |
|---|
| PNIWLSLIH CNLWPSFID CRLVPUFHD |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'PNIWLSLIH'Test 8
Verdict: RUNTIME ERROR
| input |
|---|
| ZDYIAVTKL ZJKVXGAUM |
| correct output |
|---|
| ZDYIAVTKL ZJYVAGTUL ZJKVXGAUM |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'ZDYIAVTKL'Test 9
Verdict: RUNTIME ERROR
| input |
|---|
| FBIXISJH NXZIESMG |
| correct output |
|---|
| FBIXISJH NBZXESMH NXZIESMG |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'FBIXISJH'Test 10
Verdict: RUNTIME ERROR
| input |
|---|
| OPGW QJIE |
| correct output |
|---|
| OPGW QPIW QJIE |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'OPGW'Test 11
Verdict: RUNTIME ERROR
| input |
|---|
| DUKNPKQZBL NZPBMOEBIC |
| correct output |
|---|
| DUKNPKQZBL NUPNMKEZIL NZPBMOEBIC |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'DUKNPKQZBL'Test 12
Verdict: RUNTIME ERROR
| input |
|---|
| ZWDTX HZOXI |
| correct output |
|---|
| ZWDTX HWOTI HZOXI |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'ZWDTX'Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| URJF ITIQ |
| correct output |
|---|
| URJF IRIF ITIQ |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'URJF'Test 14
Verdict: RUNTIME ERROR
| input |
|---|
| WYWBWU IRYVBA |
| correct output |
|---|
| WYWBWU WRWVWA IRYVBA |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 4, in <module>
n = int(input())
ValueError: invalid literal for int() with base 10: 'WYWBWU'