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 listJun 11, 2026 05:20Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 22:30Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 22:47029,060,52412,579,0005,899,00098,304Exit with code 2: unexpected fault address 0x1104a000 fatal error: fault [signal SIGSEGV: segmentation violation code=0x1 addr=0x1104a000 pc=0x1000115c] goroutine 1 gp=0x28e471ee41e0 m=0 mp=0x526f60 [running]: runtime.throw({0x48e3f4?, 0x546940?}) ru...stderr
2Jun 11, 2026 05:223,50339,909,75226,590,0002,136,0002,138,112
3Jun 11, 2026 05:223,53739,035,10326,777,0002,227,0002,138,112
4Jun 11, 2026 05:223,54639,155,29426,875,0002,208,0002,138,112
5Jun 11, 2026 05:223,58239,234,48927,157,0002,221,0002,138,112
6Jun 11, 2026 05:223,58744,139,44127,259,0002,162,0002,138,112
7Jun 11, 2026 05:223,61539,829,37127,523,0002,121,0002,138,112
8Jun 11, 2026 05:223,61940,049,12427,340,0002,339,0002,138,112
9Jun 11, 2026 05:223,65440,129,06327,749,0002,217,0002,138,112
10Jun 11, 2026 05:2213,791122,722,079110,039,0003,054,0002,138,112