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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:30Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:30032,926,86922,268,0001,211,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:30032,922,39322,328,0001,091,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:30033,341,36422,292,0001,194,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 04:173,20449,769,46923,245,0003,031,0002,310,144
5Apr 14, 2026 04:173,21150,013,22624,308,0002,025,0002,306,048
6Apr 14, 2026 04:173,21553,885,92722,304,0004,055,0002,490,368
7Apr 14, 2026 04:173,22053,666,00823,361,0003,047,0002,490,368
8Apr 14, 2026 04:173,22459,840,93725,421,0001,016,0002,465,792
9Apr 14, 2026 04:173,24254,747,57224,541,0002,045,0002,461,696
10Apr 14, 2026 04:173,25056,658,45624,601,0002,050,0002,449,408
11Apr 14, 2026 04:173,31855,281,58725,189,0002,015,0002,363,392
12Apr 14, 2026 04:173,32758,336,58725,262,0002,020,0002,445,312