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 listMay 20, 2024 21:36Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2024 21:3600000Error: expected "2325980324 ", got "0"stderr
2May 20, 2024 21:4000000Error: No answer to stdout. Died or killed?stderr
3May 20, 2024 21:4000000Error: expected "2218555142 ", got "0"stderr
4May 20, 2024 21:4000000Error: No answer to stdout. Died or killed?stderr
5May 20, 2024 21:5000000Error: No answer to stdout. Died or killed?stderr
6May 20, 2024 21:3810,991149,028,52590,125,74802,289,664
7May 20, 2024 21:3811,012150,094,80390,301,82302,183,168
8May 20, 2024 21:3812,072187,899,54698,990,88902,199,552