提出 #15091969


ソースコード 拡げる

n, m, q = map(int, input().split())
nl, ml = [[] for _ in range(n+1)], [n]*(m+1)
for _ in range(q):
  tl = [int(i) for i in input().split()]
  if tl[0] == 1:
    idx = tl[1]
    if not nl[idx]:
      print(0)
    else:
      print(sum(ml[i] for i in nl[idx]))
  else:
    idx, num = tl[1], tl[2]
    nl[idx].append(num)
    ml[num] -= 1

提出情報

提出日時
問題 B - ダイナミック・スコアリング
ユーザ yumechi
言語 Python (3.8.2)
得点 8
コード長 351 Byte
結果 AC
実行時間 457 ms
メモリ 18184 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 8 / 8
結果
AC × 2
AC × 25
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, max_01.txt, max_02.txt, max_03.txt, max_04.txt, max_05.txt, max_06.txt, max_07.txt, max_08.txt, max_09.txt, max_10.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 273 ms 18184 KiB
hand_02.txt AC 457 ms 16128 KiB
hand_03.txt AC 272 ms 17752 KiB
max_01.txt AC 377 ms 16996 KiB
max_02.txt AC 377 ms 17216 KiB
max_03.txt AC 381 ms 17252 KiB
max_04.txt AC 374 ms 17164 KiB
max_05.txt AC 378 ms 16988 KiB
max_06.txt AC 372 ms 17468 KiB
max_07.txt AC 375 ms 17484 KiB
max_08.txt AC 368 ms 17408 KiB
max_09.txt AC 373 ms 17432 KiB
max_10.txt AC 370 ms 17248 KiB
random_01.txt AC 256 ms 11124 KiB
random_02.txt AC 134 ms 9444 KiB
random_03.txt AC 213 ms 16212 KiB
random_04.txt AC 180 ms 9512 KiB
random_05.txt AC 138 ms 13432 KiB
random_06.txt AC 131 ms 9616 KiB
random_07.txt AC 197 ms 11212 KiB
random_08.txt AC 136 ms 12368 KiB
random_09.txt AC 353 ms 16596 KiB
random_10.txt AC 90 ms 11920 KiB
sample_01.txt AC 26 ms 8924 KiB
sample_02.txt AC 26 ms 8908 KiB