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 listMay 5, 2026 07:52Victor MerckléVictor MerckléError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 5, 2026 07:52021,675,36902,351,0002,531,328expected "2045556049 ", got "0 "stderr
2May 5, 2026 07:52023,416,04402,384,0002,523,136expected "2075576404 ", got "0 "stderr
3May 5, 2026 07:52020,183,38802,331,0002,523,136expected "2128035675 ", got "0 "stderr