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 17, 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 17, 2024 22:5700000Error: expected "2164818925 ", got "655100160"
2May 17, 2024 22:5700000Error: expected "2129397185 ", got "3194240551"
3May 17, 2024 22:5800000Error: expected "2136222392 ", got "32741"
4May 17, 2024 22:5800000Error: expected "2131821088 ", got "32591"
5May 17, 2024 22:5800000Error: No answer to stdout. Died or killed?
6May 17, 2024 22:5800000Error: expected "2142036789 ", got "32650"
7May 17, 2024 22:5800000Error: No answer to stdout. Died or killed?
8May 17, 2024 23:0000000Error: expected "2154036638 ", got "2635374119"stderr
9May 17, 2024 23:0000000Error: expected "2158660844 ", got "2951981312"stderr
10May 17, 2024 23:0100000Error: expected "2187759064 ", got "0"stderr
11May 17, 2024 23:0100000Error: expected "2138611111 ", got "32513"stderr
12May 17, 2024 23:0100000Error: No answer to stdout. Died or killed?stderr