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 20, 2022 16:42Bernard 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 20, 2022 16:4200000Error: expected "2139858161 ", got "2"
2Nov 20, 2022 16:4200000Error: expected "2187180894 ", got "2"
3Nov 20, 2022 16:4300000Error: expected "2212991282 ", got "2"
4Nov 20, 2022 16:4300000Error: expected "2097295986 ", got "2"
5Nov 20, 2022 16:4300000Error: expected "2228217612 ", got "2"
6Nov 20, 2022 16:4400000Error: expected "2089066410 ", got "2"
7Nov 20, 2022 16:4900000Error: expected "1983893772 ", got "1"
8Nov 20, 2022 16:4900000Error: expected "2143775078 ", got "2"
9Nov 20, 2022 16:425,626108,000,19746,132,17202,301,952
10Nov 20, 2022 16:425,641119,185,86446,259,97702,183,168
11Nov 20, 2022 16:435,751112,299,75247,161,39302,285,568
12Nov 20, 2022 16:425,760126,414,34647,229,49702,273,280
13Nov 20, 2022 16:435,850124,810,03347,968,76902,301,952
14Nov 20, 2022 16:435,878113,546,54748,199,16102,187,264