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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:39Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:39033,052,92122,582,0001,076,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:39033,068,95422,557,0001,104,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:39033,036,32022,512,0001,078,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 03:303,27854,219,46224,889,0001,991,0002,342,912
5Apr 14, 2026 03:403,31052,723,84425,129,0002,010,0002,404,352
6Apr 14, 2026 03:403,31158,036,79125,140,0002,011,0002,293,760
7Apr 14, 2026 03:303,31456,469,98525,164,0002,013,0002,502,656
8Apr 14, 2026 03:403,31556,770,56226,181,0001,006,0002,289,664
9Apr 14, 2026 03:303,32555,901,44125,242,0002,019,0002,277,376
10Apr 14, 2026 03:303,32654,910,90624,241,0003,030,0002,502,656
11Apr 14, 2026 03:403,33054,417,77123,262,0004,045,0002,392,064
12Apr 14, 2026 03:403,33054,000,03025,284,0002,022,0002,523,136
13Apr 14, 2026 03:403,34656,980,07624,391,0003,048,0002,314,240
14Apr 14, 2026 03:403,34652,663,70327,435,00002,387,968
15Apr 14, 2026 03:303,34751,209,48925,413,0002,033,0002,445,312
16Apr 14, 2026 03:303,35347,559,62327,493,00002,412,544
17Apr 14, 2026 03:403,39457,913,76225,840,0001,987,0002,502,656
18Apr 14, 2026 03:303,39453,589,62726,839,000994,0002,273,280
19Apr 14, 2026 03:403,39555,710,19526,849,000994,0002,281,472
20Apr 14, 2026 03:303,39652,238,67726,857,000994,0002,502,656
21Apr 14, 2026 03:303,42552,606,61724,072,0004,012,0002,416,640