結果
| 問題 | No.893 お客様を誘導せよ |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:58:18 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 64 ms / 2,000 ms |
| + 403µs | |
| コード長 | 740 bytes |
| 記録 | |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 94,208 KB |
| 最終ジャッジ日時 | 2026-10-12 21:00:55 |
| 合計ジャッジ時間 | 1,758 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
import sys
from collections import deque
def main():
n = int(sys.stdin.readline())
queues = []
total_customers = 0
for _ in range(n):
parts = list(map(int, sys.stdin.readline().split()))
p_i = parts[0]
customers = parts[1:]
queues.append(deque(customers))
total_customers += p_i
manual_queue = []
while total_customers > 0:
for i in range(n):
if len(queues[i]) > 0:
customer = queues[i].popleft()
manual_queue.append(str(customer))
total_customers -= 1
if total_customers == 0:
break
print(' '.join(manual_queue))
if __name__ == "__main__":
main()
lam6er