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 03:32Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:33Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:34033,249,36622,644,0001,172,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:34033,181,89922,673,0001,079,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:34033,005,69122,509,0001,078,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 03:323,25658,523,82125,672,0001,026,0002,514,944
5Apr 14, 2026 03:323,27257,810,08622,854,0003,974,0002,355,200
6Apr 14, 2026 03:323,27252,857,31625,838,000993,0002,437,120
7Apr 14, 2026 03:323,27357,361,40424,848,0001,987,0002,527,232
8Apr 14, 2026 03:323,28453,296,62423,937,0002,992,0002,351,104
9Apr 14, 2026 03:323,28755,518,60123,962,0002,995,0002,347,008
10Apr 14, 2026 03:323,29554,400,77523,014,0004,002,0002,363,392
11Apr 14, 2026 03:323,29752,911,38424,033,0003,004,0002,473,984
12Apr 14, 2026 03:323,29858,105,98825,043,0002,003,0002,387,968