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:16Bernard 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:1600000Error: expected "2220653089 ", got "1"
2Nov 25, 2022 18:1600000Error: expected "2069377083 ", got "1"
3Nov 25, 2022 18:1700000Error: expected "2046246370 ", got "1"
4Nov 25, 2022 18:1700000Error: expected "1951877776 ", got "1"
5Nov 25, 2022 18:1700000Error: expected "2179510962 ", got "2"
6Nov 25, 2022 18:174,758101,606,41839,012,37302,248,704
7Nov 25, 2022 18:164,762120,015,35639,048,92502,232,320
8Nov 25, 2022 18:174,783103,881,33539,222,97102,273,280
9Nov 25, 2022 18:164,785118,760,56439,235,83502,269,184
10Nov 25, 2022 18:174,785103,296,73239,238,88302,224,128
11Nov 25, 2022 18:164,792114,736,26139,290,81302,215,936
12Nov 25, 2022 18:174,814121,141,49039,472,09102,265,088
13Nov 25, 2022 18:174,820116,167,93639,520,30102,265,088
14Nov 25, 2022 18:174,860109,338,31339,849,63302,203,648