結果

問題 No.714 回転寿司屋のシミュレート
ユーザー 👑 KazunKazun
提出日時 2020-11-14 03:39:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 78,724 KB
最終ジャッジ日時 2023-09-30 04:44:47
合計ジャッジ時間 6,262 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
71,448 KB
testcase_01 AC 130 ms
71,488 KB
testcase_02 AC 87 ms
75,832 KB
testcase_03 AC 99 ms
76,852 KB
testcase_04 AC 101 ms
76,532 KB
testcase_05 AC 123 ms
77,872 KB
testcase_06 AC 116 ms
76,872 KB
testcase_07 AC 139 ms
77,952 KB
testcase_08 AC 141 ms
78,004 KB
testcase_09 AC 144 ms
78,724 KB
testcase_10 AC 132 ms
78,540 KB
testcase_11 AC 130 ms
78,468 KB
testcase_12 AC 125 ms
77,796 KB
testcase_13 AC 123 ms
77,964 KB
testcase_14 AC 125 ms
78,168 KB
testcase_15 AC 119 ms
77,740 KB
testcase_16 AC 111 ms
77,144 KB
testcase_17 AC 121 ms
77,992 KB
testcase_18 AC 119 ms
78,004 KB
testcase_19 AC 116 ms
78,560 KB
testcase_20 AC 123 ms
77,572 KB
testcase_21 AC 108 ms
77,148 KB
testcase_22 AC 111 ms
77,172 KB
testcase_23 AC 112 ms
77,152 KB
testcase_24 AC 122 ms
78,108 KB
testcase_25 AC 111 ms
77,068 KB
testcase_26 AC 115 ms
77,112 KB
testcase_27 AC 108 ms
76,424 KB
testcase_28 AC 104 ms
77,064 KB
testcase_29 AC 114 ms
77,096 KB
testcase_30 AC 78 ms
71,316 KB
testcase_31 AC 85 ms
71,452 KB
testcase_32 AC 81 ms
71,136 KB
testcase_33 AC 77 ms
71,488 KB
testcase_34 AC 82 ms
71,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=[]

List=[{} for _ in range(21)]
for _ in range(N):
    k,*U=input().split()
    k=int(k)
    if k==0:
        n,m,*E=U
        n=int(n);m=int(m)
        for a in E:
            if a in List[n]:
                List[n][a]+=1
            else:
                List[n][a]=1
    elif k==1:
        B,=U
        F=0
        for i in range(1,21):
            if B in List[i] and List[i][B]>0:
                List[i][B]-=1
                X.append(i)
                F=1
                break

        if F==0:
            X.append(-1)
    else:
        C,=U
        C=int(C)
        List[C]={}
print(*X,sep="\n")
0