提出 #2357755
ソースコード 拡げる
n = gets.to_i xs = gets.chomp.split.map(&:to_i) sorted = xs.sort l = sorted[n/2 - 1] r = sorted[n/2] n.times do |i| puts xs[i] <= l ? r : l end
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Many Medians |
| ユーザ | kikunantoka |
| 言語 | Ruby (2.3.3) |
| 得点 | 300 |
| コード長 | 154 Byte |
| 結果 | AC |
| 実行時間 | 299 ms |
| メモリ | 25316 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample1.txt, sample2.txt, sample3.txt |
| All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 11.txt, 12.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 1.txt | AC | 7 ms | 1788 KiB |
| 10.txt | AC | 281 ms | 24644 KiB |
| 11.txt | AC | 269 ms | 24440 KiB |
| 12.txt | AC | 197 ms | 15472 KiB |
| 2.txt | AC | 145 ms | 13576 KiB |
| 3.txt | AC | 288 ms | 24988 KiB |
| 4.txt | AC | 282 ms | 24648 KiB |
| 5.txt | AC | 293 ms | 25212 KiB |
| 6.txt | AC | 282 ms | 24768 KiB |
| 7.txt | AC | 218 ms | 15984 KiB |
| 8.txt | AC | 283 ms | 24768 KiB |
| 9.txt | AC | 299 ms | 25316 KiB |
| sample1.txt | AC | 7 ms | 1788 KiB |
| sample2.txt | AC | 7 ms | 1788 KiB |
| sample3.txt | AC | 7 ms | 1788 KiB |