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 17, 2024 17:10ndbnndbnScore: 1,079,485Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 17, 2024 17:101,070,8768,812,313,8838,636,283,000144,904,0002,519,040
2Nov 17, 2024 17:101,074,8718,843,872,1668,668,063,000145,883,0002,519,040
3Nov 17, 2024 17:101,078,8078,879,233,7148,700,326,000145,888,0002,486,272
4Nov 17, 2024 17:101,078,9908,879,452,2238,703,824,000143,897,0002,514,944
5Nov 17, 2024 17:101,079,4858,883,150,5848,706,876,000144,898,0002,334,720
6Nov 17, 2024 17:101,080,9128,894,147,3968,717,601,000145,876,0002,519,040
7Nov 17, 2024 17:101,083,0188,913,364,1938,738,846,000141,900,0002,281,472
8Nov 17, 2024 17:101,083,8158,916,933,5738,744,390,000142,891,0002,523,136
9Nov 17, 2024 17:101,090,9288,970,910,3098,801,715,000143,897,0002,424,832