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 listMar 1, 2023 01:28Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 1, 2023 01:2900000Error: expected "2055335378 ", got "Out of range. Balance: -4318575. Count: 3139405 0"stderr
2Mar 1, 2023 01:2855,173505,702,233452,419,12202,240,512
3Mar 1, 2023 01:2857,074523,096,379468,009,26902,244,608
4Mar 1, 2023 01:2857,651532,139,241472,741,35202,252,800