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 19, 2022 18:04Bernard 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 19, 2022 18:0400000Error: expected "2244561476 ", got "1"
2Nov 19, 2022 18:0400000Error: expected "2336640133 ", got "1"
3Nov 19, 2022 18:0400000Error: expected "2065537635 ", got "1"
4Nov 19, 2022 18:047,509116,789,85461,570,23702,256,896
5Nov 19, 2022 18:048,546127,291,13070,079,72102,224,128
6Nov 19, 2022 18:048,586131,687,89970,402,74802,301,952
7Nov 19, 2022 18:048,741163,883,23071,677,88102,293,760
8Nov 19, 2022 18:048,791132,776,97872,085,65202,256,896
9Nov 19, 2022 18:048,844144,868,13872,522,00002,265,088
10Nov 19, 2022 18:049,200157,303,93275,438,10702,293,760
11Nov 19, 2022 18:049,252144,837,90475,870,32002,207,744
12Nov 19, 2022 18:049,276142,899,72076,059,84702,183,168
13Nov 19, 2022 18:049,695148,302,29679,498,05202,187,264
14Nov 19, 2022 18:049,957139,979,55881,648,83202,191,360
15Nov 19, 2022 18:0410,264158,504,79184,161,26202,260,992