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 15, 2023 15:48Yuriy LyfenkoYuriy LyfenkoScore: 5,080Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 15:484,890564,639,07030,072,00010,024,0002,523,136
2Jul 15, 2023 15:484,929567,161,13434,352,0006,062,0002,351,104
3Jul 15, 2023 15:484,967566,489,33533,600,0007,127,0002,347,008
4Jul 15, 2023 15:484,985568,646,76235,895,0004,985,0002,371,584
5Jul 15, 2023 15:485,005566,682,77539,038,0002,001,0002,400,256
6Jul 15, 2023 15:485,045570,934,21536,323,0005,044,0002,473,984
7Jul 15, 2023 15:485,080566,746,09636,700,0004,959,0002,482,176
8Jul 15, 2023 15:485,091572,306,13631,807,0009,939,0002,367,488
9Jul 15, 2023 15:485,247569,624,33134,023,0009,006,0002,400,256
10Jul 15, 2023 15:485,397607,257,62444,257,01702,306,048
11Jul 15, 2023 15:485,410608,138,37844,365,01202,273,280
12Jul 15, 2023 15:485,481615,114,12444,940,76302,240,512