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 00:01zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 20:57Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 20:59039,696,15927,266,0003,413,00020,480Exit with code 1: 3242231536 100000000 3142231536 3342231536 3142231536 3342231536 50000000 100000000 3142231536 3342231536 33592779 2344035stderr
2Oct 16, 2024 00:014,73761,809,71834,859,0003,983,0002,326,528
3Oct 16, 2024 00:014,75859,564,71129,010,00010,003,0002,469,888
4Oct 16, 2024 00:014,77568,109,87332,125,0007,027,0002,297,856
5Oct 16, 2024 00:014,78461,071,42633,196,0006,035,0002,400,256
6Oct 16, 2024 00:014,79266,758,30028,212,00011,083,0002,351,104
7Oct 16, 2024 00:014,83770,834,62030,512,0009,153,0002,342,912
8Oct 16, 2024 00:014,85866,570,78429,876,0009,958,0002,281,472
9Oct 16, 2024 00:014,85971,748,55836,857,0002,988,0002,392,064
10Oct 16, 2024 00:015,00862,446,77332,049,0009,014,0002,535,424