結果
| 問題 |
No.714 回転寿司屋のシミュレート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-07-13 22:48:01 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 2,000 ms |
| コード長 | 382 bytes |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,544 KB |
| 最終ジャッジ日時 | 2024-10-09 05:26:41 |
| 合計ジャッジ時間 | 4,663 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
コンパイルメッセージ
Main.rb:9: warning: assigned but unused variable - m Syntax OK
ソースコード
N = gets.to_i
customers = 20.times.map{[]}
$<.map{|s|
# p customers
sa = s.split
case sa.shift
when ?0
n, m, *a = sa
customers[n.to_i-1] = a
when ?1
neta = sa.shift
p (customers.index{|wish_list|
idx = wish_list.index(neta)
idx && wish_list.delete_at(idx)
} || -2) + 1
else
n = sa.shift.to_i
customers[n - 1] = Array.new
end
}