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 listMay 7, 2023 02:16Yuriy 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
1May 7, 2023 02:1700000Error: expected "2274955698 ", got "2147483648 "stderr
2May 7, 2023 02:174,745110,357,87538,911,84302,228,224
3May 7, 2023 02:174,897109,280,28940,153,99002,252,800
4May 7, 2023 02:174,926102,014,27940,396,16702,277,376
5May 7, 2023 02:165,181108,083,85142,480,50002,318,336
6May 7, 2023 02:165,268124,898,61443,194,62102,203,648
7May 7, 2023 02:165,620104,315,00346,082,33402,285,568