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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:32Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:32032,668,19522,145,0001,102,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:32032,526,41922,031,0001,088,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:32032,744,57322,264,0001,085,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 04:183,20254,942,42724,236,0002,019,0002,281,472
5Apr 14, 2026 04:183,21452,603,33621,288,0005,068,0002,523,136
6Apr 14, 2026 04:183,21957,776,66123,352,0003,045,0002,510,848
7Apr 14, 2026 04:183,23056,803,62624,447,0002,037,0002,338,816
8Apr 14, 2026 04:183,24452,691,70725,578,0001,023,0002,367,488
9Apr 14, 2026 04:183,24655,759,84623,548,0003,071,0002,273,280
10Apr 14, 2026 04:183,27252,796,77525,839,000993,0002,404,352
11Apr 14, 2026 04:183,27757,525,88624,880,0001,990,0002,441,216
12Apr 14, 2026 04:183,32460,266,07625,237,0002,019,0002,306,048