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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:38Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:38033,662,84123,186,0001,093,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:38033,585,33923,052,0001,086,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:38033,688,63623,107,0001,154,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 03:113,29357,085,07525,002,0002,000,0002,351,104
5Apr 14, 2026 03:103,29551,577,80025,016,0002,001,0002,412,544
6Apr 14, 2026 03:103,30153,989,56526,070,0001,002,0002,482,176
7Apr 14, 2026 03:113,32353,899,79825,232,0002,018,0002,416,640
8Apr 14, 2026 03:103,32652,975,90325,250,0002,020,0002,482,176
9Apr 14, 2026 03:113,32855,460,19126,278,0001,010,0002,514,944
10Apr 14, 2026 03:113,33652,050,65225,331,0002,026,0002,482,176
11Apr 14, 2026 03:113,33953,005,06425,355,0002,028,0002,527,232
12Apr 14, 2026 03:103,34051,318,15225,362,0002,029,0002,297,856
13Apr 14, 2026 03:113,34358,579,37125,382,0002,030,0002,510,848
14Apr 14, 2026 03:113,34753,310,05824,398,0003,049,0002,363,392
15Apr 14, 2026 03:103,34749,402,71624,397,0003,049,0002,445,312
16Apr 14, 2026 03:113,35350,000,11127,492,00002,330,624
17Apr 14, 2026 03:103,35856,571,83726,519,0001,019,0002,326,528
18Apr 14, 2026 03:103,35854,086,64226,516,0001,019,0002,338,816
19Apr 14, 2026 03:113,36554,674,17025,551,0002,044,0002,326,528
20Apr 14, 2026 03:103,39053,367,65225,814,0001,985,0002,502,656
21Apr 14, 2026 03:103,39659,917,60125,859,0001,989,0002,297,856