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 6, 2024 09:37Matt StuchlikMatt StuchlikScore: 976,670Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 6, 2024 09:37974,2998,025,609,8347,793,391,000195,859,0002,301,952
2Nov 6, 2024 09:37975,7508,037,910,3247,790,305,000210,845,0002,281,472
3Nov 6, 2024 09:37975,7788,037,766,1067,797,523,000203,856,0002,445,312
4Nov 6, 2024 09:37976,2738,042,872,4467,817,592,000187,846,0002,281,472
5Nov 6, 2024 09:37976,6708,047,623,4557,807,849,000200,841,0002,297,856
6Nov 6, 2024 09:37979,0188,062,666,6897,820,130,000207,817,0002,297,856
7Nov 6, 2024 09:37980,6208,073,424,4937,831,265,000209,819,0002,457,600
8Nov 6, 2024 09:37981,4628,083,677,3407,857,159,000190,833,0002,453,504
9Nov 6, 2024 09:37982,9828,092,764,9797,861,614,000198,838,0002,293,760