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 listJul 9, 2025 08:47Valentin KofmanValentin KofmanError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:26Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:32081,331,18754,046,00016,671,0002,117,632expected "0 ", got "2013265920 "stderr
2Oct 5, 2026 21:32060,280,89140,965,0008,700,0002,117,632expected "1 ", got "2013265920 "stderr
3Oct 5, 2026 21:32056,261,91238,398,0006,581,0002,117,632expected "1 ", got "2013265920 "stderr
4Jul 9, 2025 08:475,10364,953,60932,881,0008,967,0002,306,048
5Jul 9, 2025 08:475,10467,802,08636,870,0004,982,0002,289,664
6Jul 9, 2025 08:475,15165,284,73527,152,00015,084,0002,461,696
7Jul 9, 2025 08:475,20471,005,95733,527,0009,143,0002,433,024
8Jul 9, 2025 08:475,22966,275,13534,900,0007,977,0002,404,352
9Jul 9, 2025 08:475,25163,433,54235,051,0008,011,0002,367,488
10Jul 9, 2025 08:475,29771,621,05234,342,0009,090,0002,412,544
11Jul 9, 2025 08:475,36570,624,20632,995,00010,998,0002,469,888
12Jul 9, 2025 08:475,49570,843,15031,042,00014,019,0002,424,832