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 21, 2022 16:23Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 21, 2022 16:2300000Error: expected "2367527407 ", got "1"
2Nov 21, 2022 16:235,560111,823,17945,591,43502,232,320
3Nov 21, 2022 16:235,682106,519,51746,592,56402,240,512
4Nov 21, 2022 16:235,691103,201,13546,666,29502,220,032
5Nov 21, 2022 16:235,696130,682,55146,708,73202,285,568
6Nov 21, 2022 16:235,730126,478,00546,989,45202,293,760
7Nov 21, 2022 16:235,755129,461,86447,187,73002,301,952
8Nov 21, 2022 16:235,768115,530,10447,294,14702,195,456
9Nov 21, 2022 16:235,776108,241,93747,362,17902,228,224
10Nov 21, 2022 16:235,776126,212,68147,363,32802,199,552
11Nov 21, 2022 16:235,827124,974,72047,783,50702,256,896
12Nov 21, 2022 16:235,916118,734,54248,514,20402,228,224
13Nov 21, 2022 16:235,944122,366,71948,744,41302,244,608