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 19:13eldon-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 19:1200000Error: expected "2211197975 ", got "2271818173 "stderr
2Sep 10, 2022 19:1300000Error: expected "2069316826 ", got "2105386395 "stderr
3Sep 10, 2022 19:1319,734224,677,849161,822,40702,269,184
4Sep 10, 2022 19:1319,811231,070,686162,452,68402,265,088
5Sep 10, 2022 19:1320,113223,303,823164,928,04802,301,952
6Sep 10, 2022 19:1320,279228,813,251166,284,11302,297,856
7Sep 10, 2022 19:1320,338248,954,232166,770,76702,240,512
8Sep 10, 2022 19:1320,762238,737,790170,244,70202,228,224