結果

問題 No.2421 entersys?
ユーザー sepa38
提出日時 2023-07-21 08:43:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,079 bytes
コンパイル時間 713 ms
コンパイル使用メモリ 81,964 KB
実行使用メモリ 127,132 KB
最終ジャッジ日時 2024-09-21 10:55:47
合計ジャッジ時間 15,411 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

n = int(input())
assert 1 <= n <= 10 ** 5
alp = [chr(i+97) for i in range(26)]
d = dict()
for _ in range(n):
x, l, r = map(str, input().split())
l = int(l)
r = int(r)
assert 1 <= len(x) <= 5
for c in x:
assert c in alp
assert 1 <= l <= 10 ** 9
assert 1 <= r <= 10 ** 9
assert l <= r
if x not in d:
d[x] = dict()
d[x][l-0.1] = 0
d[x][r+0.1] = 1
q = int(input())
for _ in range(q):
qr = list(map(str, input().split()))
qr[0] = int(qr[0])
if qr[0] == 1:
x, t = qr[1:]
assert 1 <= len(x) <= 5
for c in x:
assert c in alp
t = int(t)
assert 1 <= t <= 10 ** 9
elif qr[0] == 2:
t = int(qr[1])
assert 1 <= t <= 10 ** 9
elif qr[0] == 3:
x, l, r = qr[1:]
l = int(l)
r = int(r)
assert 1 <= len(x) <= 5
for c in x:
assert c in alp
assert 1 <= l <= 10 ** 9
assert 1 <= r <= 10 ** 9
assert l <= r
if x not in d:
d[x] = dict()
d[x][l-0.1] = 0
d[x][r+0.1] = 1
for x in d.keys():
prev = 1
for t in sorted(d[x].keys()):
assert d[x][t] ^ prev
prev = d[x][t]
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0