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 listSep 6, 2022 16:18eldon-chungeldon-chungError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 6, 2022 16:1800000Error: expected "2223273773 ", got "1"stderr
2Sep 6, 2022 16:1900000Error: expected "2128903364 ", got "0"stderr
3Sep 6, 2022 16:1900000Error: expected "2255450975 ", got "1"stderr
4Sep 6, 2022 16:1900000Error: expected "2160981090 ", got "1"stderr
5Sep 6, 2022 16:2400000Error: expected "2078498923 ", got "0"stderr
6Sep 6, 2022 16:2400000Error: expected "2032135422 ", got "0"stderr
7Sep 6, 2022 16:2400000Error: expected "2038861750 ", got "0"stderr
8Sep 6, 2022 16:2500000Error: expected "2179003000 ", got "1"stderr