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 listJul 11, 2025 07:15Valentin KofmanValentin KofmanError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:24Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:25054,635,04735,874,0008,194,0002,117,632expected "4294967294 ", got "0 "stderr
2Oct 5, 2026 21:25066,883,25545,801,00010,541,0002,117,632expected "110164 ", got "2042626048 "stderr
3Oct 5, 2026 21:25033,968,26822,232,0001,208,0002,117,632expected "4294967295 ", got "0 "stderr
4Jul 11, 2025 07:154,52357,931,27233,077,0004,009,0002,502,656
5Jul 11, 2025 07:154,55763,300,80329,288,0008,079,0002,293,760
6Jul 11, 2025 07:154,59470,038,02431,562,0006,108,0002,281,472
7Jul 11, 2025 07:154,61462,271,56431,862,0005,974,0002,301,952
8Jul 11, 2025 07:154,66063,105,47233,182,0005,027,0002,494,464
9Jul 11, 2025 07:154,86169,219,34934,877,0004,982,0002,273,280
10Jul 11, 2025 07:154,87168,092,48125,961,00013,979,0002,486,272
11Jul 11, 2025 07:154,87663,383,09325,988,00013,993,0002,347,008
12Jul 11, 2025 07:154,91067,688,73232,213,0008,053,0002,269,184