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 04:32Yuriy LyfenkoYuriy LyfenkoScore: 5,250Success
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 04:325,00766,087,22835,049,0006,008,0002,383,872
2May 7, 2023 04:325,06573,610,16329,376,00012,155,0002,514,944
3May 7, 2023 04:325,08366,943,48935,581,0006,099,0002,281,472
4May 7, 2023 04:325,11571,062,51736,954,0004,993,0002,519,040
5May 7, 2023 04:325,12371,787,08837,005,0005,000,0002,465,792
6May 7, 2023 04:325,22566,772,48636,869,0005,978,0002,326,528
7May 7, 2023 04:325,25067,331,01337,044,0006,007,0002,355,200
8May 7, 2023 04:325,302110,794,30043,472,70302,285,568
9May 7, 2023 04:325,30969,306,74034,424,0009,112,0002,293,760
10May 7, 2023 04:325,331105,155,87043,717,04002,211,840
11May 7, 2023 04:325,38573,243,64140,147,0004,014,0002,383,872
12May 7, 2023 04:325,556109,417,84545,555,49002,273,280