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 10, 2022 17:15eldon-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 10, 2022 17:1500000Error: expected "2014050478 ", got "-1"stderr
2Sep 10, 2022 17:3700000Error: expected "2016344208 ", got "-1"stderr
3Sep 10, 2022 17:3800000Error: expected "1975806852 ", got "-1"stderr
4Sep 10, 2022 17:3742,789422,340,996350,870,67802,244,608
5Sep 10, 2022 17:1542,800427,235,829350,963,86002,265,088
6Sep 10, 2022 17:1543,373427,340,226355,659,35402,269,184
7Sep 10, 2022 17:3744,161422,189,580362,116,11702,285,568
8Sep 10, 2022 17:1544,234435,907,933362,716,58102,306,048
9Sep 10, 2022 17:3744,598427,686,869365,702,12402,232,320
10Sep 10, 2022 17:1544,766436,277,254367,079,70602,183,168
11Sep 10, 2022 17:1545,546438,681,962373,480,65902,297,856
12Sep 10, 2022 17:1545,803441,409,586375,581,29802,256,896