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 listOct 16, 2024 01:08zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 30, 2026 22:10Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 30, 2026 22:11035,186,36025,775,000020,480Exit with code 1: 800000 400000 522024 400000 522024 1947483648 1947483648 30000000 1917483648 1977483648 1917483648 1977483648 50000000 100000000 1917483648 1977483648 50000000 0stderr
2Oct 16, 2024 01:083,92765,771,80028,174,0004,024,0002,428,928
3Oct 16, 2024 01:084,01757,473,20229,942,0002,994,0002,338,816
4Oct 16, 2024 01:084,07253,338,48929,346,0004,047,0002,342,912