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 8, 2025 21:54Valentin KofmanValentin KofmanError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:26Andrew Epstein14.61CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:32083,397,08362,909,00010,105,0002,117,632expected "4294967294 ", got "1211809791 "stderr
2Oct 5, 2026 21:32092,755,50769,923,00010,952,0002,117,632expected "655327 ", got "2013265920 "stderr
3Oct 5, 2026 21:32057,810,46346,492,0001,007,00020,480No answer to stdout. Died or killed?stderr
4Jul 8, 2025 21:548,03693,785,80358,908,0006,989,0002,293,760
5Jul 8, 2025 21:548,19089,751,98258,137,0009,021,0002,400,256
6Jul 8, 2025 21:548,19189,181,89960,153,0007,017,0002,314,240
7Jul 8, 2025 21:548,19695,116,23359,182,0008,024,0002,490,368
8Jul 8, 2025 21:548,23395,704,16056,430,00011,084,0002,510,848
9Jul 8, 2025 21:548,27895,784,05257,896,0009,982,0002,306,048
10Jul 8, 2025 21:548,30697,761,58360,096,0008,012,0002,326,528
11Jul 8, 2025 21:548,32297,952,02159,208,0009,031,0002,285,568
12Jul 8, 2025 21:548,34489,858,20357,354,00011,068,0002,469,888