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 25, 2022 18:21Bernard 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 25, 2022 18:2100000Error: expected "2142444315 ", got "2"
2Nov 25, 2022 18:2100000Error: expected "2231462863 ", got "1"
3Nov 25, 2022 18:2100000Error: expected "2161919843 ", got "2"
4Nov 25, 2022 18:2200000Error: expected "2219877472 ", got "1"
5Nov 25, 2022 18:2200000Error: expected "2221518229 ", got "1"
6Nov 25, 2022 18:2200000Error: expected "2018901547 ", got "1"
7Nov 25, 2022 18:2200000Error: expected "2221077327 ", got "1"
8Nov 25, 2022 18:2200000Error: expected "2277800352 ", got "1"
9Nov 25, 2022 18:214,71698,726,24038,673,60302,183,168
10Nov 25, 2022 18:214,762128,167,29239,051,38102,269,184
11Nov 25, 2022 18:214,782109,516,75139,214,08802,228,224
12Nov 25, 2022 18:224,844113,850,20939,717,40902,248,704
13Nov 25, 2022 18:224,91193,182,56940,271,51102,236,416
14Nov 25, 2022 18:224,982113,839,06240,855,22302,220,032