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:13apuxbtapuxbtError
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:1700000Error: Exit with code 255: stage1, total(ms):52 clt = 51047230stderr
2Sep 30, 2023 19:2000000Error: Exit with code 255: stage1, total(ms):58 clt = 50730727stderr
3Sep 30, 2023 19:2000000Error: Exit with code 255: stage1, total(ms):59 clt = 51539296stderr
4Sep 30, 2023 19:1800000Error: Exit with code 255: stage1, total(ms):50 clt = 47482696 K = 2517304stderr
5Sep 30, 2023 19:1800000Error: Exit with code 255: stage1, total(ms):51 clt = 50459213stderr
6Sep 30, 2023 19:1700000Error: Exit with code 255: stage1, total(ms):53 clt = 48171220 K = 1828780stderr
7Sep 30, 2023 19:1700000Error: Exit with code 255: stage1, total(ms):48 clt = 45877146 K = 4122854stderr
8Sep 30, 2023 19:1700000Error: Exit with code 255: stage1, total(ms):51 clt = 46817841 K = 3182159stderr
9Sep 30, 2023 19:1700000Error: Exit with code 255: stage1, total(ms):50 clt = 54293649stderr
10Sep 30, 2023 19:1700000Error: Exit with code 255: stage1, total(ms):50 clt = 48687116 K = 1312884stderr
11Sep 30, 2023 19:1600000Error: Exit with code 255: stage1, total(ms):50 clt = 47868727 K = 2131273stderr
12Sep 30, 2023 19:1600000Error: Exit with code 255: stage1, total(ms):49 clt = 47936180 K = 2063820stderr
13Sep 30, 2023 19:1600000Error: Exit with code 255: stage1, total(ms):50 clt = 46535867 K = 3464133stderr
14Sep 30, 2023 19:1500000Error: Exit with code 255: stage1, total(ms):48 clt = 47194459 K = 2805541stderr
15Sep 30, 2023 19:1410,589169,768,71586,831,64202,211,840
16Sep 30, 2023 19:1410,677142,967,78487,553,13102,224,128
17Sep 30, 2023 19:1410,912150,514,99289,480,18102,220,032
18Sep 30, 2023 19:1313,442171,721,324110,221,03202,277,376
19Sep 30, 2023 19:1313,607172,371,736111,580,11002,269,184
20Sep 30, 2023 19:1313,658173,222,947111,992,65102,260,992