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 listSep 11, 2022 14:19Bernard 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
1Sep 11, 2022 14:1900000Error: expected "2170973630 ", got "1 13319150 63481781 50162631 50000000 "
2Sep 11, 2022 14:2000000Error: expected "2105523484 ", got "1 2037118 13745189 11708071 50000000 "
3Sep 11, 2022 14:2300000Error: expected "2139175879 ", got "2139175879 18583592 54024404 35440812 50000000 "
4Sep 11, 2022 14:2500000Error: expected "2152330472 ", got "1 16546566 49688912 33142346 50000000 "
5Sep 11, 2022 14:2500000Error: expected "2051736770 ", got "1 4867113 67203976 62336863 50000000 "
6Sep 11, 2022 14:2500000Error: expected "2122191907 ", got "2122191907 7270366 51952858 44682492 50000000 "
7Sep 11, 2022 14:2500000Error: expected "2123403351 ", got "1 3127934 9134762 6006828 50000000 "