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

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 12:31Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 12:32032,904,02222,149,0001,224,0002,117,632expected "0 ", got "2147483648 "stderr
2Jul 5, 2026 12:32032,673,59922,220,0001,086,0002,117,632expected "0 ", got "2147483648 "stderr
3Jul 5, 2026 12:32032,686,58122,090,0001,145,0002,117,632expected "0 ", got "2147483648 "stderr
4Apr 14, 2026 04:203,19157,577,86223,148,0003,019,0002,367,488
5Apr 14, 2026 04:203,20156,105,81225,237,0001,009,0002,465,792
6Apr 14, 2026 04:203,20153,414,21522,210,0004,038,0002,461,696
7Apr 14, 2026 04:203,21950,734,70726,392,00002,502,656
8Apr 14, 2026 04:203,21957,521,97723,352,0003,045,0002,457,600
9Apr 14, 2026 04:203,23349,864,89826,511,00002,392,064
10Apr 14, 2026 04:203,23353,971,39023,454,0003,059,0002,359,296
11Apr 14, 2026 04:203,23449,032,03226,515,00002,351,104
12Apr 14, 2026 04:203,23449,239,44623,457,0003,059,0002,420,736
13Apr 14, 2026 04:203,24147,605,67425,551,0001,022,0002,355,200
14Apr 14, 2026 04:203,27256,761,64224,846,0001,987,0002,269,184
15Apr 14, 2026 04:203,27355,932,88723,857,0002,982,0002,310,144