結果
| 問題 | No.714 回転寿司屋のシミュレート |
| コンテスト | |
| ユーザー |
nadare
|
| 提出日時 | 2018-07-13 22:57:44 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 44 ms / 2,000 ms |
| + 662µs | |
| コード長 | 686 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2026-09-12 09:15:44 |
| 合計ジャッジ時間 | 2,658 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
# -*- coding: utf-8 -*-
from itertools import product
from heapq import heappop, heappush
from collections import defaultdict
def inpl(): return map(int, input().split())
N = int(input())
sushi = defaultdict(list)
want = [[] for _ in range(21)]
for _ in range(N):
order, *remain = input().split()
if order == "0":
n, m, *A = remain
want[int(n)] = A
elif order == "1":
B = remain[0]
for i in range(21):
if B in want[i]:
j = want[i].index(B)
print(i)
del want[i][j]
break
else:
print(-1)
else:
C = int(remain[0])
want[C] = []
nadare