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 10, 2025 21:08Valentin KofmanValentin KofmanError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 21:26Andrew Epstein13.72CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 21:32068,067,67844,459,00012,505,0002,117,632expected "4294967293 ", got "0 "stderr
2Oct 5, 2026 21:32037,173,90824,692,0001,206,0002,121,728expected "3930579250 ", got "0 "stderr
3Oct 5, 2026 21:32036,269,41424,586,0001,114,0002,121,728expected "2361604917 ", got "0 "stderr
4Jul 10, 2025 21:084,76865,310,99033,080,0006,014,0002,400,256
5Jul 10, 2025 21:084,80461,598,49833,334,0006,060,0002,338,816
6Jul 10, 2025 21:084,85066,034,68632,812,0006,960,0002,277,376
7Jul 10, 2025 21:084,85165,029,34930,827,0008,949,0002,510,848
8Jul 10, 2025 21:084,87964,834,24430,008,00010,002,0002,387,968
9Jul 10, 2025 21:084,88163,173,64031,017,0009,005,0002,322,432
10Jul 10, 2025 21:084,92260,694,04831,282,0009,081,0002,367,488
11Jul 10, 2025 21:084,92962,803,70230,316,00010,105,0002,387,968
12Jul 10, 2025 21:085,13276,256,44229,056,00013,025,0002,428,928