結果

問題 No.893 お客様を誘導せよ
ユーザー maimai
提出日時 2019-09-27 21:30:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 11,964 KB
実行使用メモリ 20,520 KB
最終ジャッジ日時 2023-10-25 01:51:12
合計ジャッジ時間 2,742 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,164 KB
testcase_01 AC 91 ms
16,164 KB
testcase_02 AC 103 ms
16,724 KB
testcase_03 AC 129 ms
18,332 KB
testcase_04 AC 129 ms
18,328 KB
testcase_05 AC 127 ms
18,344 KB
testcase_06 AC 114 ms
17,612 KB
testcase_07 AC 87 ms
16,164 KB
testcase_08 AC 174 ms
20,520 KB
testcase_09 AC 91 ms
16,164 KB
testcase_10 AC 86 ms
16,164 KB
testcase_11 AC 90 ms
16,164 KB
testcase_12 AC 89 ms
16,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def lscan; gets.split.map(&:to_i); end

n = gets.to_i

ww = n.times.map{lscan[1..-1]}

ans = []
while !ww.empty?
    ww = ww.map{|w| ans << w.shift; w.empty? ? nil : w}.compact
end

puts ans.compact*' '
0