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 listSep 30, 2023 19:26apuxbtapuxbtError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):58 clt = 47497920 K = 2502080stderr
2Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):54 clt = 46130309 K = 3869691stderr
3Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):55 clt = 48168522 K = 1831478stderr
4Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):54 clt = 46808495 K = 3191505stderr
5Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):52 clt = 47080862 K = 2919138stderr
6Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):55 clt = 47584585 K = 2415415stderr
7Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):53 clt = 50117093stderr
8Sep 30, 2023 19:2700000Error: Exit with code 255: stage1, total(ms):53 clt = 53000089stderr
9Sep 30, 2023 19:279,741133,844,09679,877,25302,191,360
10Sep 30, 2023 19:279,757142,824,63380,010,22302,191,360
11Sep 30, 2023 19:2710,151150,438,13383,235,31602,187,264
12Sep 30, 2023 19:2617,758206,395,506145,616,78402,273,280
13Sep 30, 2023 19:2617,888223,405,820146,680,95202,269,184
14Sep 30, 2023 19:2618,314221,835,134150,174,24902,252,800