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 14, 2023 14:20Paul MasurelPaul MasurelScore: 6,860Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 14, 2023 14:205,86679,926,26941,089,0007,015,0002,531,328
2Jul 14, 2023 14:205,99874,888,99739,147,00010,037,0002,441,216
3Jul 14, 2023 14:206,03473,424,55046,449,0003,029,0002,478,080
4Jul 14, 2023 14:206,14678,956,32845,356,0005,039,0002,330,624
5Jul 14, 2023 14:206,19776,289,16139,858,00010,961,0002,441,216
6Jul 14, 2023 14:206,751138,099,85455,357,94302,224,128
7Jul 14, 2023 14:206,860125,352,73756,250,21302,306,048
8Jul 14, 2023 14:2020,294195,875,999160,394,0006,014,0002,347,008
9Jul 14, 2023 14:2020,453197,288,435158,734,0008,984,0002,301,952
10Jul 14, 2023 14:2020,663195,904,888160,411,0009,023,0002,392,064
11Jul 14, 2023 14:2021,010202,268,603168,272,0004,006,0002,461,696
12Jul 14, 2023 14:2021,044235,511,219172,561,50702,224,128