結果
問題 | No.714 回転寿司屋のシミュレート |
ユーザー |
![]() |
提出日時 | 2018-09-01 18:50:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-19 16:48:38 |
合計ジャッジ時間 | 2,410 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
from collections import CounterN = int(input())seat = [{} for _ in range(20)]for _ in range(N):f, *data = input().split()f = int(f)if f == 0:n, m, *A = dataseat[int(n) - 1] = Counter(A)elif f == 1:B, *_ = datafor i, order in enumerate(seat):if order and order[B] > 0:order[B] -= 1print(i + 1)breakelse:print(-1)elif f == 2:C = int(*data) - 1seat[C] = {}