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 listMay 7, 2023 04:34Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2023 04:3400000Error: expected "2041418523 ", got "1059663486 "stderr
2May 7, 2023 04:345,07275,490,17438,620,0002,970,0002,400,256
3May 7, 2023 04:345,14775,419,31035,171,0007,034,0002,375,680
4May 7, 2023 04:345,15069,470,24431,172,00011,061,0002,412,544
5May 7, 2023 04:345,18868,248,39737,477,0005,064,0002,310,144
6May 7, 2023 04:345,26371,699,57536,129,0007,025,0002,383,872
7May 7, 2023 04:345,27671,768,25837,226,0006,036,0002,527,232
8May 7, 2023 04:345,29268,230,53436,332,0007,064,0002,367,488
9May 7, 2023 04:345,32165,243,29635,515,0008,117,0002,478,080
10May 7, 2023 04:345,46778,730,87439,852,0004,981,0002,338,816
11May 7, 2023 04:345,691128,227,45046,666,81002,277,376
12May 7, 2023 04:345,733104,070,69847,011,24502,281,472
13May 7, 2023 04:345,757119,052,46247,209,46002,293,760