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 listJul 13, 2023 14:43Paul MasurelPaul MasurelScore: 20,738Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2023 14:445,65669,213,71441,336,0005,040,0002,338,816
2Jul 13, 2023 14:445,83572,361,47041,869,0005,981,0002,310,144
3Jul 13, 2023 14:445,91374,084,02044,449,0004,040,0002,519,040
4Jul 13, 2023 14:436,204115,420,71450,869,10002,228,224
5Jul 13, 2023 14:446,321121,226,80951,831,67802,301,952
6Jul 13, 2023 14:446,333124,305,26351,933,25002,306,048
7Jul 13, 2023 14:436,379108,780,72352,309,87702,191,360
8Jul 13, 2023 14:4420,642202,173,182165,261,0004,006,0002,420,736
9Jul 13, 2023 14:4420,692195,465,773162,691,0006,986,0002,445,312
10Jul 13, 2023 14:4420,738199,415,962164,048,0006,001,0002,310,144
11Jul 13, 2023 14:4420,745199,464,699167,107,0003,001,0002,293,760
12Jul 13, 2023 14:4420,760195,540,031166,228,0004,005,0002,347,008
13Jul 13, 2023 14:4420,839249,045,834170,882,94902,191,360
14Jul 13, 2023 14:4420,969205,743,846166,947,0004,998,0002,510,848
15Jul 13, 2023 14:4320,979240,356,141172,031,19802,236,416
16Jul 13, 2023 14:4321,099231,329,629173,010,53702,224,128
17Jul 13, 2023 14:4321,168238,443,188173,578,16902,236,416
18Jul 13, 2023 14:4321,287242,343,693174,549,85102,301,952