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 10, 2026 08:47Pavel SkripkinPavel SkripkinError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:31Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:350321,699,020298,047,00014,588,0002,117,632expected "0 ", got " "
2Oct 5, 2026 21:350496,769,119473,539,00013,937,0002,117,632expected "0 ", got " "
3Oct 5, 2026 21:350263,609,967243,252,00010,710,0002,117,632expected "677226 ", got " "
4May 10, 2026 08:484,66551,221,61332,795,0005,461,0002,396,160
5May 10, 2026 08:484,83055,311,55233,512,0006,101,0002,543,616
6May 10, 2026 08:484,86756,933,96333,626,0006,289,0002,469,888
7May 10, 2026 08:484,86953,377,48834,669,0005,261,0002,371,584
8May 10, 2026 08:484,88954,879,09133,861,0006,234,0002,404,352
9May 10, 2026 08:484,91453,627,63533,875,0006,424,0002,314,240
10May 10, 2026 08:484,95155,467,27733,992,0006,612,0002,371,584
11May 10, 2026 08:484,96757,050,66734,388,0006,344,0002,301,952
12May 10, 2026 08:4825,712225,820,319204,741,0006,098,0002,338,816