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 17, 2021 09:23Dmitry 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 17, 2021 09:1900000Error: expected "1994765352 ", got "2013265920 "stderr
2Jun 17, 2021 09:2357,555522,909,292471,950,35402,170,880
3Jun 17, 2021 09:2359,303544,574,590486,288,10102,179,072
4Jun 17, 2021 09:2361,607574,592,442505,175,54602,301,952