結果
問題 | No.714 回転寿司屋のシミュレート |
ユーザー |
|
提出日時 | 2018-07-13 22:43:00 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 37 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-10-09 05:25:30 |
合計ジャッジ時間 | 4,329 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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{|c| idx = c.index(neta) idx && c.delete_at(idx) } || -2) + 1 else n = sa.shift.to_i customers[n - 1] = [] end }