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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:34Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:34033,105,47322,439,0001,175,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:34033,184,22422,584,0001,186,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:34033,224,99522,596,0001,177,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 03:433,27951,826,52823,900,0002,987,0002,523,136
5Apr 14, 2026 03:433,28450,654,49825,931,000997,0002,490,368
6Apr 14, 2026 03:433,28556,751,14524,938,0001,995,0002,465,792
7Apr 14, 2026 03:433,29152,560,18525,991,000999,0002,457,600
8Apr 14, 2026 03:433,30453,608,80025,084,0002,006,0002,482,176
9Apr 14, 2026 03:433,32053,172,60624,197,0003,024,0002,371,584