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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 13:38Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 13:38036,832,97926,211,0001,137,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 13:38036,349,46925,848,0001,108,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 13:38036,346,55225,872,0001,107,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 02:263,86759,621,05027,615,0004,091,0002,269,184
5Apr 14, 2026 02:263,88361,422,84928,854,0002,984,0002,330,624
6Apr 14, 2026 02:263,88358,176,92226,866,0004,975,0002,367,488
7Apr 14, 2026 02:313,88363,419,37728,857,0002,985,0002,363,392
8Apr 14, 2026 02:313,88862,198,51527,900,0003,985,0002,355,200
9Apr 14, 2026 02:313,89859,727,18528,964,0002,996,0002,445,312