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 listJul 16, 2023 18:50Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2023 18:5000000Error: expected "1895636611 ", got "644925763 "stderr
2Jul 16, 2023 18:535,187605,990,97942,537,24702,260,992
3Jul 16, 2023 20:215,289613,401,57943,369,71902,289,664
4Jul 16, 2023 20:215,322626,203,45343,643,01102,306,048
5Jul 16, 2023 18:535,350614,178,11243,866,04502,289,664
6Jul 16, 2023 20:215,387621,657,61744,175,06102,306,048
7Jul 16, 2023 18:535,489619,147,60645,011,76302,310,144