結果
問題 | No.714 回転寿司屋のシミュレート |
ユーザー |
|
提出日時 | 2022-06-20 23:26:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 661 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-13 12:27:33 |
合計ジャッジ時間 | 2,303 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
from collections import defaultdictn = int(input())Cnt = defaultdict(lambda :[0 for _ in range(21)])for _ in range(n):L = list(input().split())if L[0] == '0':j = int(L[1])m = int(L[2])L = L[3:]for i in range(m):Cnt[L[i]][j] += 1elif L[0] == '1':s = L[1]flag = Falsefor i in range(1, 21):if Cnt[s][i] > 0:Cnt[s][i] -= 1print(i)flag = Truebreakif not flag:print(-1)elif L[0] == '2':j = int(L[1])for s in Cnt.keys():Cnt[s][j] = 0