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 listFeb 21, 2024 10:12Huy Duc LeHuy Duc LeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2024 10:1200000Error: expected "2265729449 ", got "2199999952 "stderr
2Feb 21, 2024 10:1200000Error: expected "2227683661 ", got "2199999908 "stderr
3Feb 21, 2024 10:1600000Error: No answer to stdout. Died or killed?stderr
4Feb 21, 2024 10:1700000Error: No answer to stdout. Died or killed?stderr
5Feb 21, 2024 10:1700000Error: expected "2229296618 ", got "2199999925 "stderr
6Feb 21, 2024 10:186,759129,213,63755,424,75902,252,800
7Feb 21, 2024 10:186,959112,534,10557,065,10202,281,472
8Feb 21, 2024 10:186,972119,344,56957,172,78102,293,760