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:56Dmitry 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:5100000Error: died or killedstderr
2Jun 19, 2021 09:5300000Error: died or killedstderr
3Jun 19, 2021 09:5600000Error: died or killedstderr
4Jun 19, 2021 09:5672,565671,263,608595,029,63702,297,856
5Jun 19, 2021 09:56547,8244,555,280,2794,492,157,31902,297,856
6Jun 19, 2021 09:561,220,76910,076,422,51310,010,305,02602,170,880
7Jun 19, 2021 09:561,228,90210,145,563,06510,076,999,55702,293,760
8Jun 19, 2021 09:561,783,87814,683,633,32514,627,797,85902,293,760
9Jun 19, 2021 09:562,298,25718,913,923,02018,845,706,00202,285,568