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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 13:40Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 13:410536,459,42825,767,0001,150,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 13:410536,359,60725,635,0001,130,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 13:410536,362,34325,609,0001,136,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 02:073,805562,431,64930,195,0001,006,0002,437,120
5Apr 14, 2026 02:083,880557,738,43627,841,0003,977,0002,453,504
6Apr 14, 2026 02:073,909563,240,71730,050,0002,003,0002,404,352
7Apr 14, 2026 02:073,914557,731,94129,083,0003,008,0002,494,464
8Apr 14, 2026 02:083,928557,655,91730,198,0002,013,0002,441,216
9Apr 14, 2026 02:083,943559,913,47428,289,0004,041,0002,457,600
10Apr 14, 2026 02:083,948561,440,66431,363,0001,011,0002,453,504
11Apr 14, 2026 02:083,957554,050,83730,423,0002,028,0002,269,184
12Apr 14, 2026 02:083,976563,014,75728,652,0003,952,0002,363,392