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 8, 2022 18:29eldon-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 8, 2022 18:2800000Error: expected "2025962047 ", got "-1"stderr
2Sep 8, 2022 18:2800000Error: expected "1941680240 ", got "-1"stderr
3Sep 8, 2022 18:2800000Error: expected "2005164621 ", got "-1"stderr
4Sep 8, 2022 18:2900000Error: expected "1983857945 ", got "-1"stderr
5Sep 8, 2022 18:2900000Error: expected "2032921122 ", got "-1"stderr
6Sep 8, 2022 18:2944,261439,289,285362,938,55402,183,168
7Sep 8, 2022 18:2844,337431,210,920363,563,25302,183,168
8Sep 8, 2022 18:2944,983430,073,747368,856,61602,297,856
9Sep 8, 2022 18:2845,146428,683,018370,196,13802,293,760
10Sep 8, 2022 18:2946,256445,800,497379,298,71302,301,952
11Sep 8, 2022 18:2946,580441,009,008381,955,64902,293,760
12Sep 8, 2022 18:2946,621435,743,876382,293,81702,301,952
13Sep 8, 2022 18:2846,804456,030,609383,795,68202,244,608
14Sep 8, 2022 18:2946,821463,567,072383,932,40302,301,952