Median Sergey Svistunov

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.

Back to listNov 11, 2024 10:47Matt StuchlikMatt StuchlikError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2024 10:4900000Error: No answer to stdout. Died or killed?stderr
2Nov 11, 2024 10:4800000Error: expected "2276481556 ", got "0 "stderr
3Nov 11, 2024 10:4700000Error: No answer to stdout. Died or killed?stderr
4Nov 11, 2024 10:468,44190,170,57760,188,0009,028,0002,404,352
5Nov 11, 2024 10:499,06495,433,06068,295,0006,026,0002,478,080
6Nov 11, 2024 10:479,289105,631,34469,155,0007,015,0002,428,928
7Nov 11, 2024 10:469,338102,915,71868,509,0008,059,0002,347,008
8Nov 11, 2024 10:469,365102,178,57971,809,0004,986,0002,285,568
9Nov 11, 2024 10:469,497104,280,43367,894,0009,984,0002,437,120
10Nov 11, 2024 10:489,977105,658,11675,828,0005,986,0002,273,280
11Nov 11, 2024 10:4810,100105,160,58774,840,0007,983,0002,514,944
12Nov 11, 2024 10:4810,112105,382,09774,925,0007,992,0002,420,736
13Nov 11, 2024 10:4910,186105,121,49277,491,0006,038,0002,424,832
14Nov 11, 2024 10:4610,364106,027,61177,989,0006,999,0002,441,216
15Nov 11, 2024 10:4710,444111,394,85478,586,0007,052,0002,510,848
16Nov 11, 2024 10:4910,587110,629,24880,825,0005,987,0002,351,104
17Nov 11, 2024 10:4611,560124,894,30288,802,0005,986,0002,281,472
18Nov 11, 2024 10:4712,252123,328,37693,436,0007,032,0002,473,984