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 22, 2022 08:22Robert BurkeRobert BurkeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 22, 2022 08:2000000Error: Killed by timeoutstderr
2Nov 22, 2022 08:224,36459,635,05423,858,00011,929,0002,347,008
3Nov 22, 2022 08:224,37159,118,76428,876,0006,970,0002,482,176
4Nov 22, 2022 08:224,37257,794,66125,895,0009,959,0002,322,432
5Nov 22, 2022 08:224,40557,558,85626,085,00010,032,0002,273,280
6Nov 22, 2022 08:224,46662,466,69828,482,0008,137,0002,379,776
7Nov 22, 2022 08:224,49265,260,95326,880,0009,955,0002,289,664
8Nov 22, 2022 08:224,51056,990,30126,985,0009,994,0002,490,368
9Nov 22, 2022 08:224,53058,568,34829,112,0008,031,0002,514,944
10Nov 22, 2022 08:224,57156,172,05526,339,00011,143,0002,338,816
11Nov 22, 2022 08:214,658111,989,90238,194,15202,244,608
12Nov 22, 2022 08:224,67296,124,97138,309,95602,220,032
13Nov 22, 2022 08:234,743100,097,96938,890,10102,191,360
14Nov 22, 2022 08:224,74598,831,32138,907,11602,199,552
15Nov 22, 2022 08:214,76199,218,90139,042,27002,301,952
16Nov 22, 2022 08:234,798100,401,14439,345,84202,240,512
17Nov 22, 2022 08:214,806103,166,71239,406,05002,285,568
18Nov 22, 2022 08:234,807100,974,09539,413,34802,215,936
19Nov 22, 2022 08:234,877107,687,03239,988,85002,232,320
20Nov 22, 2022 08:234,87897,966,50640,001,66402,297,856
21Nov 22, 2022 08:224,879110,179,86840,008,09702,224,128
22Nov 22, 2022 08:234,962104,383,68640,692,42002,224,128