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 listApr 14, 2026 04:37Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:26Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:27031,871,31521,276,0001,188,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:27032,059,61021,483,0001,103,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:27031,970,76121,322,0001,192,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 04:373,10449,196,53723,419,0002,036,0002,359,296
5Apr 14, 2026 04:373,11654,743,27924,528,0001,022,0002,318,336
6Apr 14, 2026 04:373,12649,134,74923,584,0002,050,0002,428,928
7Apr 14, 2026 04:373,15350,111,96823,867,0001,988,0002,486,272
8Apr 14, 2026 04:373,16456,833,29222,953,0002,993,0002,420,736
9Apr 14, 2026 04:373,16648,827,12121,971,0003,994,0002,502,656
10Apr 14, 2026 04:373,16851,793,14723,978,0001,998,0002,289,664
11Apr 14, 2026 04:373,19852,757,48724,204,0002,017,0002,396,160
12Apr 14, 2026 04:373,24059,419,35624,524,0002,043,0002,441,216