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 26, 2023 08:52mmalczakmmalczakError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 26, 2023 08:5100000Error: expected "2245200780 ", got "2114402922 "stderr
2Nov 26, 2023 08:5300000Error: expected "2258418577 ", got "1097273045 "stderr
3Nov 26, 2023 08:5400000Error: expected "2223367869 ", got "2320864555 "stderr
4Nov 26, 2023 08:5400000Error: expected "2222564865 ", got "3198295015 "stderr
5Nov 26, 2023 08:5500000Error: No answer to stdout. Died or killed?stderr
6Nov 26, 2023 14:2900000Error: No answer to stdout. Died or killed?stderr
7Nov 26, 2023 08:5744,043419,936,420361,156,42902,301,952
8Nov 26, 2023 08:5747,669458,662,343390,888,15302,179,072
9Nov 26, 2023 14:1748,846468,493,096400,541,27102,174,976
10Nov 26, 2023 14:1749,055457,063,972402,252,98002,179,072
11Nov 26, 2023 08:5749,523461,781,615406,089,90802,170,880
12Nov 26, 2023 08:5250,254482,557,006412,084,77202,170,880
13Nov 26, 2023 08:5250,546470,561,200414,478,91002,179,072
14Nov 26, 2023 08:5253,156486,726,674435,876,15102,183,168
15Nov 26, 2023 14:1754,336509,930,314445,557,18102,297,856