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 listJun 19, 2021 09:57Dmitry DolgopolovDmitry DolgopolovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2021 09:5800000Error: died or killedstderr
2Jun 19, 2021 09:5842,927415,159,417351,997,78802,297,856
3Jun 19, 2021 09:57117,3271,022,664,440962,084,54202,224,128
4Jun 19, 2021 09:58262,1832,201,427,8602,149,901,86802,293,760
5Jun 19, 2021 09:57498,6084,157,400,5664,088,586,10002,285,568
6Jun 19, 2021 09:57636,9975,280,606,7065,223,378,67802,289,664
7Jun 19, 2021 09:58685,1355,699,548,4005,618,103,78902,297,856