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 listNov 11, 2024 05:49Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 11, 2024 05:4600000Error: Exit with code 1: Index out of boundsstderr
2Nov 11, 2024 05:4700000Error: Exit with code 1: Index out of boundsstderr
3Nov 11, 2024 05:4700000Error: Exit with code 1: Index out of boundsstderr
4Nov 11, 2024 05:4800000Error: Exit with code 1: Index out of boundsstderr
5Nov 11, 2024 05:4900000Error: Exit with code 1: Index out of boundsstderr
6Nov 11, 2024 05:5000000Error: Exit with code 1: Index out of boundsstderr
7Nov 11, 2024 05:5100000Error: Exit with code 1: Index out of boundsstderr
8Nov 11, 2024 05:5100000Error: Exit with code 1: Index out of boundsstderr
9Nov 11, 2024 05:5200000Error: Exit with code 1: Index out of boundsstderr
10Nov 11, 2024 05:5200000Error: Exit with code 1: Index out of boundsstderr
11Nov 11, 2024 05:5400000Error: Exit with code 1: Index out of boundsstderr
12Nov 11, 2024 05:5500000Error: Exit with code 1: Index out of boundsstderr
13Nov 11, 2024 05:5700000Error: Exit with code 1: Index out of boundsstderr
14Nov 11, 2024 05:499,934110,935,10475,425,0006,034,0002,519,040
15Nov 11, 2024 05:4910,546114,851,00381,451,0005,027,0002,441,216
16Nov 11, 2024 05:4911,684127,738,87188,821,0006,985,0002,396,160