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 7, 2022 05:40Yuriy 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
1Sep 7, 2022 05:4000000Error: expected "2288078015 ", got "2147483648 "stderr
2Sep 7, 2022 05:414,983596,855,78540,860,53502,211,840
3Sep 7, 2022 05:415,001601,406,23741,009,02302,232,320
4Sep 7, 2022 05:415,255618,198,80243,087,41302,310,144