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 16, 2024 20:35ndbnndbnScore: 1,567,732Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 16, 2024 20:351,557,25912,799,612,57312,636,620,000132,901,0002,514,944
2Nov 16, 2024 20:351,563,46312,852,554,98212,692,490,000127,904,0002,523,136
3Nov 16, 2024 20:351,566,36812,880,368,44912,744,285,00099,931,0002,519,040
4Nov 16, 2024 20:351,566,87812,881,518,38312,720,493,000127,904,0002,535,424
5Nov 16, 2024 20:351,567,73212,889,228,17212,735,490,000119,910,0002,396,160
6Nov 16, 2024 20:351,569,83412,903,718,06912,749,728,000122,910,0002,531,328
7Nov 16, 2024 20:351,572,27112,925,066,68512,775,718,000116,905,0002,519,040
8Nov 16, 2024 20:351,574,11112,938,679,73512,770,811,000136,901,0002,469,888
9Nov 16, 2024 20:351,574,35812,939,966,04812,784,832,000124,900,0002,535,424