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 listMay 1, 2026 16:51Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 12:58Tomislav Tunkovic33.25CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 13:00058,079,40632,974,00014,487,00049,152Exit with code 2: unexpected fault address 0x7dffb8000000 fatal error: fault [signal SIGSEGV: segmentation violation code=0x2 addr=0x7dffb8000000 pc=0x7dffb4d5a80d] goroutine 1 gp=0x23f9d8c7a1e0 m=0 mp=0x550160 [running]: runtime.throw({0x4a5cc7?, 0x2...stderr
2May 1, 2026 16:533,83047,161,93127,355,0004,052,0002,572,288
3May 1, 2026 16:533,85151,579,73730,561,0001,018,0002,498,560
4May 1, 2026 16:533,86646,231,04528,635,0003,068,0002,461,696
5May 1, 2026 16:533,91746,309,74628,111,0004,015,0002,351,104
6May 1, 2026 16:533,93150,128,40229,214,0003,022,0002,568,192
7May 1, 2026 16:5313,979132,529,562109,646,0004,983,0002,408,448
8May 1, 2026 16:5314,072133,844,303113,388,0002,006,0002,404,352
9May 1, 2026 16:5314,106135,293,561109,689,0005,983,0002,539,520
10May 1, 2026 16:5314,277134,518,206112,072,0005,003,0002,428,928