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:32eldon-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:3200000Error: expected "2042223151 ", got "-1"stderr
2Sep 8, 2022 18:3200000Error: expected "2032632088 ", got "-1"stderr
3Sep 8, 2022 18:3244,663427,363,038366,236,76402,297,856
4Sep 8, 2022 18:3244,666445,813,917366,262,71702,297,856
5Sep 8, 2022 18:3244,730444,763,906366,788,61902,310,144
6Sep 8, 2022 18:3245,055427,419,997369,450,77002,297,856
7Sep 8, 2022 18:3245,084420,792,355369,686,38102,301,952
8Sep 8, 2022 18:3246,010441,483,748377,283,67102,306,048
9Sep 8, 2022 18:3246,528452,025,041381,526,94702,301,952
10Sep 8, 2022 18:3246,567442,896,468381,847,62502,297,856
11Sep 8, 2022 18:3248,015458,568,540393,723,42502,179,072