結果

問題 No.893 お客様を誘導せよ
ユーザー gemmarogemmaro
提出日時 2019-10-29 21:26:06
言語 Ruby
(3.3.0)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 11,276 KB
実行使用メモリ 17,856 KB
最終ジャッジ日時 2023-10-12 23:31:29
合計ジャッジ時間 2,903 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,044 KB
testcase_01 AC 81 ms
15,008 KB
testcase_02 AC 96 ms
15,812 KB
testcase_03 AC 126 ms
16,684 KB
testcase_04 AC 124 ms
16,760 KB
testcase_05 AC 123 ms
16,840 KB
testcase_06 AC 111 ms
16,060 KB
testcase_07 AC 83 ms
15,024 KB
testcase_08 AC 162 ms
17,856 KB
testcase_09 AC 88 ms
15,012 KB
testcase_10 AC 83 ms
15,228 KB
testcase_11 AC 101 ms
15,236 KB
testcase_12 AC 94 ms
15,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

everyone = []
gets.chomp.to_i.times { everyone << gets.chomp.split.map(&:to_i)[1..] }

def is_empty(array)
    array.each {|vec| return false if not vec.size == 0 }
    true
end

order = []
while (not is_empty(everyone))
    everyone.each {|line|
        customer = line.shift
        order << customer if customer
    }
end
puts order.join ' '
0