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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 13:22Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 13:22036,085,85425,570,0001,165,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 13:22036,006,78525,437,0001,165,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 13:22037,624,51825,723,0001,202,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 02:123,59152,637,98727,415,0002,030,0002,273,280
5Apr 14, 2026 02:123,59252,909,68328,441,0001,015,0002,293,760
6Apr 14, 2026 02:323,60053,594,64929,523,00002,297,856
7Apr 14, 2026 02:123,61556,195,83127,601,0002,044,0002,482,176
8Apr 14, 2026 02:123,61759,560,41228,637,0001,022,0002,473,984
9Apr 14, 2026 02:103,62054,586,18128,665,0001,023,0002,510,848
10Apr 14, 2026 02:123,63856,599,42228,841,000994,0002,355,200
11Apr 14, 2026 02:123,63956,582,74128,849,000994,0002,293,760
12Apr 14, 2026 02:323,63957,176,54329,839,00002,502,656
13Apr 14, 2026 02:323,63958,963,97527,854,0001,989,0002,383,872
14Apr 14, 2026 02:123,64063,822,38428,852,000994,0002,314,240
15Apr 14, 2026 02:293,64157,926,72926,868,0002,985,0002,461,696
16Apr 14, 2026 02:103,64254,812,11726,880,0002,986,0002,289,664
17Apr 14, 2026 02:103,64558,204,70726,903,0002,989,0002,330,624
18Apr 14, 2026 02:123,65260,675,25126,955,0002,995,0002,527,232
19Apr 14, 2026 02:293,66659,670,79328,058,0002,004,0002,416,640
20Apr 14, 2026 02:123,69457,656,32327,263,0003,029,0002,351,104
21Apr 14, 2026 02:293,72055,528,68928,469,0002,033,0002,412,544