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 19, 2024 18:14zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:35Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:3509,186,5681,106,000020,480No answer to stdout. Died or killed?
2Oct 19, 2024 18:083,23849,496,78926,548,00002,453,504
3Oct 19, 2024 18:143,25158,062,80725,635,0001,025,0002,375,680
4Oct 19, 2024 18:083,27558,897,97624,863,0001,989,0002,469,888
5Oct 19, 2024 18:143,27555,717,21324,865,0001,989,0002,387,968
6Oct 19, 2024 18:143,28248,277,17423,923,0002,990,0002,371,584
7Oct 19, 2024 18:083,28351,696,82324,926,0001,994,0002,461,696
8Oct 19, 2024 18:083,28448,315,73224,936,0001,994,0002,461,696
9Oct 19, 2024 18:143,28748,841,13624,956,0001,996,0002,269,184
10Oct 19, 2024 18:163,28848,660,43623,965,0002,995,0002,449,408
11Oct 19, 2024 18:143,29350,576,53225,004,0002,000,0002,297,856
12Oct 19, 2024 18:143,29453,438,07325,012,0002,000,0002,342,912
13Oct 19, 2024 18:083,29648,623,52424,022,0003,002,0002,301,952
14Oct 19, 2024 18:143,29651,738,98524,024,0003,003,0002,482,176
15Oct 19, 2024 18:143,30849,128,41622,104,0005,023,0002,338,816
16Oct 19, 2024 18:083,31056,147,46226,138,0001,005,0002,408,448
17Oct 19, 2024 18:163,31348,057,60025,154,0002,012,0002,510,848
18Oct 19, 2024 18:143,31854,693,15724,184,0003,023,0002,326,528
19Oct 19, 2024 18:163,32048,072,91926,217,0001,008,0002,437,120
20Oct 19, 2024 18:083,32354,571,68425,232,0002,018,0002,465,792
21Oct 19, 2024 18:083,34054,175,21425,356,0002,028,0002,416,640
22Oct 19, 2024 18:083,35850,399,91723,455,0004,079,0002,342,912
23Oct 19, 2024 18:143,61753,249,60128,634,0001,022,0002,387,968
24Oct 19, 2024 18:143,64156,429,72328,858,000995,0002,396,160
25Oct 19, 2024 18:143,73959,921,70729,640,0001,022,0002,392,064