Submission #2357755
Source Code Expand
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
Submission Info
| Submission Time | |
|---|---|
| Task | C - Many Medians |
| User | kikunantoka |
| Language | Ruby (2.3.3) |
| Score | 300 |
| Code Size | 154 Byte |
| Status | AC |
| Exec Time | 299 ms |
| Memory | 25316 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| 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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 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 |