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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 13:28Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 13:29036,290,95225,652,0001,207,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 13:29036,390,16325,778,0001,184,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 13:29036,330,64225,693,0001,164,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 02:373,57754,609,11326,301,0003,034,0002,293,760
5Apr 14, 2026 02:383,60050,402,16829,524,00002,306,048
6Apr 14, 2026 02:373,60357,299,40428,523,0001,018,0002,375,680
7Apr 14, 2026 02:373,68161,631,66328,173,0002,012,0002,449,408
8Apr 14, 2026 02:383,68162,694,54828,169,0002,012,0002,494,464
9Apr 14, 2026 02:383,68953,902,41429,244,0001,008,0002,527,232