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 listOct 16, 2024 01:28zielajzielajScore: 3,519Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 16, 2024 01:283,47449,088,25226,452,0002,034,0002,490,368
2Oct 16, 2024 01:283,48658,191,39128,589,00002,445,312
3Oct 16, 2024 01:283,48955,000,41626,569,0002,043,0002,469,888
4Oct 16, 2024 01:283,49456,058,87127,630,0001,023,0002,285,568
5Oct 16, 2024 01:283,51956,826,32828,858,00002,281,472
6Oct 16, 2024 01:283,52059,014,86227,865,000995,0002,355,200
7Oct 16, 2024 01:283,52056,754,58128,862,00002,527,232
8Oct 16, 2024 01:283,52753,338,22026,931,0001,994,0002,355,200
9Oct 16, 2024 01:283,53749,942,50725,001,0004,000,0002,371,584