結果

問題 No.2421 entersys?
ユーザー sepa38sepa38
提出日時 2023-07-21 08:43:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,079 bytes
コンパイル時間 827 ms
コンパイル使用メモリ 81,752 KB
実行使用メモリ 126,648 KB
最終ジャッジ日時 2023-10-21 09:50:41
合計ジャッジ時間 16,015 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

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]
0