結果

問題 No.205 マージして辞書順最小
ユーザー Tsuneo YoshiokaTsuneo Yoshioka
提出日時 2015-05-08 23:23:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 214 bytes
コンパイル時間 450 ms
コンパイル使用メモリ 11,400 KB
実行使用メモリ 19,164 KB
最終ジャッジ日時 2023-09-19 08:50:11
合計ジャッジ時間 3,133 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,044 KB
testcase_01 AC 82 ms
15,240 KB
testcase_02 AC 89 ms
15,396 KB
testcase_03 AC 90 ms
15,800 KB
testcase_04 AC 89 ms
15,448 KB
testcase_05 AC 87 ms
15,576 KB
testcase_06 AC 84 ms
15,072 KB
testcase_07 AC 95 ms
18,768 KB
testcase_08 AC 94 ms
18,496 KB
testcase_09 AC 96 ms
18,784 KB
testcase_10 AC 100 ms
19,052 KB
testcase_11 AC 99 ms
19,164 KB
testcase_12 AC 98 ms
18,816 KB
testcase_13 AC 93 ms
18,324 KB
testcase_14 AC 84 ms
15,028 KB
testcase_15 AC 85 ms
15,020 KB
testcase_16 AC 84 ms
15,272 KB
testcase_17 AC 84 ms
15,236 KB
testcase_18 AC 84 ms
15,272 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N=gets.to_i
ss=STDIN.read.split.map{|s| s + "~"}
result=""
while ! ss.empty? do
    ss.sort!
    result += ss[0][0]
    ss[0] = ss[0][1,10000]
    if(ss[0].length==1)
        ss.slice!(0,1)
    end
end
puts result
0