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 listNov 17, 2024 17:02ndbnndbnScore: 1,074,145Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 17, 2024 17:021,067,7438,784,780,6088,632,587,000122,908,0002,322,432
2Nov 17, 2024 17:021,069,9458,802,858,9538,653,635,000119,911,0002,334,720
3Nov 17, 2024 17:021,071,1608,818,691,8578,661,605,000121,910,0002,285,568
4Nov 17, 2024 17:021,073,9128,838,892,8738,680,190,000125,886,0002,535,424
5Nov 17, 2024 17:021,074,1458,843,560,7628,690,083,000117,906,0002,535,424
6Nov 17, 2024 17:021,074,2108,839,487,3698,702,597,000105,922,0002,461,696
7Nov 17, 2024 17:021,077,5748,868,678,7798,708,195,000127,914,0002,523,136
8Nov 17, 2024 17:021,080,7668,888,114,2388,735,396,000126,889,0002,523,136
9Nov 17, 2024 17:021,083,3868,914,840,4928,767,850,000115,918,0002,355,200