結果

問題 No.714 回転寿司屋のシミュレート
ユーザー brthyyjpbrthyyjp
提出日時 2021-05-05 18:16:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 651 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 79,584 KB
最終ジャッジ日時 2023-10-11 12:37:40
合計ジャッジ時間 7,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,292 KB
testcase_01 AC 92 ms
71,292 KB
testcase_02 AC 105 ms
76,736 KB
testcase_03 AC 119 ms
78,740 KB
testcase_04 AC 118 ms
77,928 KB
testcase_05 AC 147 ms
78,756 KB
testcase_06 AC 138 ms
77,860 KB
testcase_07 AC 163 ms
78,608 KB
testcase_08 AC 180 ms
79,372 KB
testcase_09 AC 168 ms
79,584 KB
testcase_10 AC 157 ms
78,964 KB
testcase_11 AC 145 ms
78,356 KB
testcase_12 AC 166 ms
79,168 KB
testcase_13 AC 151 ms
78,032 KB
testcase_14 AC 153 ms
78,864 KB
testcase_15 AC 135 ms
77,976 KB
testcase_16 AC 129 ms
77,972 KB
testcase_17 AC 159 ms
78,896 KB
testcase_18 AC 145 ms
78,180 KB
testcase_19 AC 154 ms
77,912 KB
testcase_20 AC 157 ms
78,000 KB
testcase_21 AC 146 ms
78,164 KB
testcase_22 AC 139 ms
78,016 KB
testcase_23 AC 133 ms
77,908 KB
testcase_24 AC 134 ms
77,944 KB
testcase_25 AC 141 ms
77,872 KB
testcase_26 AC 143 ms
78,840 KB
testcase_27 AC 125 ms
77,572 KB
testcase_28 AC 125 ms
77,784 KB
testcase_29 AC 132 ms
77,640 KB
testcase_30 AC 91 ms
71,868 KB
testcase_31 AC 94 ms
71,632 KB
testcase_32 AC 91 ms
71,620 KB
testcase_33 AC 91 ms
71,724 KB
testcase_34 AC 92 ms
71,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
D = [{} for i in range(20)]
from collections import Counter
for i in range(N):
    U = list(map(str, input().split()))
    if U[0] == '1':
        b = U[1]
        #print(D)
        for i in range(20):
            if b in D[i]:
                if D[i][b] == 0:
                    continue
                else:
                    D[i][b] -= 1
                    print(i+1)
                    break
        else:
            print(-1)
    elif U[0] == '0':
        n, m = int(U[1]), int(U[2])
        n -= 1
        A = U[3:]
        C = Counter(A)
        D[n] = C
    else:
        c = int(U[1])
        c -= 1
        D[c] = {}
0