Median 
Find the median of a stream of binary integers as fast as possible.
Input: 100 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).
Output: The median value, printed as a decimal string. The median is defined as the element at index N/2 (i.e., a[50000000]) in the sorted array.
Source Code
Source code access is restricted. Log in to request access.
Challenge History
No challenges yet.
Run Statistics
| # | Date | Score | Wall Time | CPU User | CPU System | Memory | Error | |
|---|---|---|---|---|---|---|---|---|
| 1 | Nov 10, 2024 11:18 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 2 | Nov 10, 2024 11:06 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 3 | Nov 10, 2024 11:07 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 4 | Nov 10, 2024 11:08 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 5 | Nov 10, 2024 11:09 | 0 | 0 | 0 | 0 | 0 | Error: expected "2116763479 ", got "2116763681 " | |
| 6 | Nov 10, 2024 11:09 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 7 | Nov 10, 2024 11:11 | 0 | 0 | 0 | 0 | 0 | Error: expected "2184987155 ", got "2184987174 " | |
| 8 | Nov 10, 2024 11:11 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 9 | Nov 10, 2024 11:12 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 10 | Nov 10, 2024 11:14 | 0 | 0 | 0 | 0 | 0 | Error: expected "2198200682 ", got "2198200760 " | |
| 11 | Nov 10, 2024 11:16 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 12 | Nov 10, 2024 11:17 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 13 | Nov 10, 2024 11:17 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 14 | Nov 10, 2024 11:05 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 15 | Nov 10, 2024 11:19 | 0 | 0 | 0 | 0 | 0 | Error: expected "2193502825 ", got "2193502937 " | |
| 16 | Nov 10, 2024 11:20 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 17 | Nov 10, 2024 11:21 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 18 | Nov 10, 2024 11:22 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 19 | Nov 10, 2024 11:23 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 20 | Nov 10, 2024 11:24 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 21 | Nov 10, 2024 11:24 | 0 | 0 | 0 | 0 | 0 | Error: expected "2232380290 ", got "2232380384 " | |
| 22 | Nov 10, 2024 11:25 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 23 | Nov 10, 2024 11:27 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 24 | Nov 10, 2024 11:28 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 25 | Nov 10, 2024 11:29 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 26 | Nov 10, 2024 11:31 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 27 | Nov 10, 2024 11:03 | 0 | 0 | 0 | 0 | 0 | Error: Exit with code 1: Index out of bounds | stderr |
| 28 | Nov 10, 2024 11:01 | 0 | 0 | 0 | 0 | 0 | Error: No answer to stdout. Died or killed? | |
| 29 | Nov 10, 2024 11:32 | 15,624 | 150,592,654 | 119,107,000 | 9,008,000 | 2,293,760 | ||
| 30 | Nov 10, 2024 11:32 | 16,461 | 165,505,828 | 126,982,000 | 7,998,000 | 2,351,104 | ||
| 31 | Nov 10, 2024 11:32 | 17,098 | 166,034,741 | 129,186,000 | 11,015,000 | 2,314,240 | ||
| 32 | Nov 10, 2024 11:32 | 17,795 | 173,105,906 | 137,922,000 | 7,995,000 | 2,531,328 | ||
| 33 | Nov 10, 2024 11:32 | 17,957 | 172,372,418 | 138,236,000 | 9,015,000 | 2,375,680 | ||
| 34 | Nov 10, 2024 11:32 | 17,978 | 169,228,877 | 137,392,000 | 10,028,000 | 2,478,080 | ||
| 35 | Nov 10, 2024 11:32 | 18,355 | 174,057,492 | 142,487,000 | 8,027,000 | 2,285,568 | ||
| 36 | Nov 10, 2024 11:32 | 18,361 | 177,165,128 | 140,527,000 | 10,037,000 | 2,412,544 | ||
| 37 | Nov 10, 2024 11:32 | 18,404 | 176,171,637 | 144,914,000 | 5,996,000 | 2,318,336 | ||
| 38 | Nov 10, 2024 11:04 | 19,920 | 191,256,437 | 154,328,000 | 9,019,000 | 2,408,448 | ||
| 39 | Nov 10, 2024 11:04 | 20,269 | 190,636,474 | 160,202,000 | 6,007,000 | 2,379,776 | ||
| 40 | Nov 10, 2024 11:02 | 20,467 | 196,371,119 | 159,840,000 | 7,992,000 | 2,416,640 | ||
| 41 | Nov 10, 2024 11:04 | 20,469 | 194,397,156 | 161,849,000 | 5,994,000 | 2,510,848 | ||
| 42 | Nov 10, 2024 11:04 | 20,495 | 191,027,684 | 151,051,000 | 17,005,000 | 2,310,144 | ||
| 43 | Nov 10, 2024 11:04 | 20,984 | 196,941,904 | 156,066,000 | 16,006,000 | 2,486,272 | ||
| 44 | Nov 10, 2024 11:04 | 21,927 | 207,848,371 | 172,806,000 | 6,992,000 | 2,494,464 | ||
| 45 | Nov 10, 2024 11:04 | 21,930 | 205,974,526 | 170,835,000 | 8,991,000 | 2,281,472 | ||
| 46 | Nov 10, 2024 11:04 | 22,125 | 207,121,244 | 170,402,000 | 11,026,000 | 2,412,544 | ||
| 47 | Nov 10, 2024 11:04 | 22,743 | 215,155,847 | 178,472,000 | 8,021,000 | 2,441,216 | ||
| 48 | Nov 10, 2024 11:02 | 22,956 | 219,098,144 | 179,232,000 | 9,011,000 | 2,285,568 | ||
| 49 | Nov 10, 2024 11:02 | 23,630 | 219,951,889 | 184,777,000 | 8,989,000 | 2,396,160 | ||
| 50 | Nov 10, 2024 11:02 | 27,780 | 252,457,858 | 207,815,000 | 19,982,000 | 2,396,160 | ||
| 51 | Nov 10, 2024 11:02 | 27,831 | 254,596,241 | 223,208,000 | 5,004,000 | 2,408,448 | ||
| 52 | Nov 10, 2024 11:02 | 29,922 | 277,739,431 | 231,342,000 | 14,020,000 | 2,535,424 |