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 7, 2025 08:30KeefeKeefeScore: 11,120Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2025 08:3011,091113,358,77887,948,0002,998,0002,510,848
2May 7, 2025 08:3111,095116,990,67589,983,000999,0002,437,120
3May 7, 2025 08:3111,104118,269,67589,048,0002,001,0002,506,752
4May 7, 2025 08:3111,107119,745,79489,080,0002,001,0002,437,120
5May 7, 2025 08:3111,111117,984,39489,111,0002,002,0002,506,752
6May 7, 2025 08:3111,116117,578,39889,146,0002,003,0002,506,752
7May 7, 2025 08:3011,118113,265,14589,162,0002,003,0002,494,464
8May 7, 2025 08:3011,119113,876,19489,174,0002,003,0002,428,928
9May 7, 2025 08:3111,119113,832,40391,178,00002,502,656
10May 7, 2025 08:3011,120118,988,94590,186,0001,002,0002,510,848
11May 7, 2025 08:3011,125113,787,73391,229,00002,428,928
12May 7, 2025 08:3111,128118,449,93590,248,0001,002,0002,510,848
13May 7, 2025 08:3011,129114,301,99589,255,0002,005,0002,420,736
14May 7, 2025 08:3011,129113,887,76290,253,0001,002,0002,502,656
15May 7, 2025 08:3111,131111,418,71190,275,0001,003,0002,420,736
16May 7, 2025 08:3011,132119,907,62090,282,0001,003,0002,408,448
17May 7, 2025 08:3111,133110,628,86290,284,0001,003,0002,506,752
18May 7, 2025 08:3011,154120,151,33190,456,0001,005,0002,437,120