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 29, 2024 22:57Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 29, 2024 22:5700000Error: No answer to stdout. Died or killed?
2May 29, 2024 22:5700000Error: No answer to stdout. Died or killed?
3May 29, 2024 22:5800000Error: expected "2304226460 ", got "0"stderr
4May 29, 2024 22:5900000Error: expected "2216490078 ", got "2227908414"stderr
5May 29, 2024 22:5900000Error: expected "2157987326 ", got "2160850864"stderr
6May 29, 2024 22:5900000Error: No answer to stdout. Died or killed?
7May 29, 2024 23:0000000Error: No answer to stdout. Died or killed?stderr
8May 29, 2024 23:0100000Error: expected "2133593804 ", got "2130927820"stderr
9May 29, 2024 23:0100000Error: expected "2116381312 ", got "2088266407"stderr
10May 29, 2024 23:0100000Error: expected "2180287594 ", got "2186604154"stderr
11May 29, 2024 23:0200000Error: No answer to stdout. Died or killed?stderr
12May 29, 2024 23:0200000Error: expected "2084888555 ", got "2073423082"stderr