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 17:40Bernard 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 17:4000000Error: expected "2318191904 ", got "1"
2Nov 21, 2022 17:4000000Error: expected "2299602400 ", got "1"
3Nov 21, 2022 17:4000000Error: expected "2191683268 ", got "2"
4Nov 21, 2022 17:405,19474,942,71736,504,0006,084,0002,301,952
5Nov 21, 2022 17:405,28469,681,45032,243,00011,083,0002,473,984
6Nov 21, 2022 17:405,30466,186,89633,376,00010,113,0002,433,024
7Nov 21, 2022 17:405,37371,042,66838,053,0006,008,0002,297,856
8Nov 21, 2022 17:405,42668,478,47636,403,0008,089,0002,433,024
9Nov 21, 2022 17:405,42667,051,32538,430,0006,067,0002,473,984
10Nov 21, 2022 17:405,51068,170,00434,141,00011,045,0002,404,352
11Nov 21, 2022 17:405,53571,018,94235,301,00010,086,0002,318,336
12Nov 21, 2022 17:405,59771,727,69033,921,00011,972,0002,498,560
13Nov 21, 2022 17:405,619116,998,56246,072,72502,256,896
14Nov 21, 2022 17:405,724114,313,19146,939,86202,265,088
15Nov 21, 2022 17:405,835115,685,61347,848,11002,203,648
16Nov 21, 2022 17:405,842109,212,84747,905,82002,269,184
17Nov 21, 2022 17:405,895109,287,27748,336,24402,269,184
18Nov 21, 2022 17:405,955109,157,57748,830,52102,293,760