Submission #2353411
Source Code Expand
import Data.List
f :: Int -> [Int] -> [Int]
f n xs = [if x <= a then b else a | x <- xs]
where
[a,b] = take 2 $ drop (div n 2 - 1) (sort xs)
main = do
n <- readLn
xs <- (map read . words) <$> getLine
mapM_ print $ f n xs
Submission Info
| Submission Time | |
|---|---|
| Task | C - Many Medians |
| User | wawktk2525 |
| Language | Haskell (GHC 7.10.3) |
| Score | 300 |
| Code Size | 246 Byte |
| Status | AC |
| Exec Time | 1657 ms |
| Memory | 102140 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 | 2 ms | 1020 KiB |
| 10.txt | AC | 1533 ms | 97660 KiB |
| 11.txt | AC | 1397 ms | 93564 KiB |
| 12.txt | AC | 1035 ms | 74236 KiB |
| 2.txt | AC | 772 ms | 51580 KiB |
| 3.txt | AC | 1548 ms | 98684 KiB |
| 4.txt | AC | 1511 ms | 94588 KiB |
| 5.txt | AC | 1609 ms | 100092 KiB |
| 6.txt | AC | 1524 ms | 94588 KiB |
| 7.txt | AC | 1204 ms | 83324 KiB |
| 8.txt | AC | 1515 ms | 93564 KiB |
| 9.txt | AC | 1657 ms | 102140 KiB |
| sample1.txt | AC | 1 ms | 508 KiB |
| sample2.txt | AC | 1 ms | 508 KiB |
| sample3.txt | AC | 1 ms | 508 KiB |