結果
問題 | No.714 回転寿司屋のシミュレート |
ユーザー | simamumu |
提出日時 | 2018-07-13 22:39:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-10-09 05:25:21 |
合計ジャッジ時間 | 2,566 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
from collections import defaultdict import sys,heapq,bisect,math,itertools,string N = int(input()) wants = [[] for i in range(20)] for _ in range(N): q = list(input().split()) if q[0] == '0': n = int(q[1]) - 1 wants[n] = q[3:] elif q[0] == '1': for i in range(20): if q[1] in wants[i]: wants[i].remove(q[1]) print(i+1) break else: print(-1) elif q[0] == '2': n = int(q[1]) - 1 wants[n] = []