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 listAug 2, 2022 17:49Yuriy 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
1Aug 2, 2022 17:4900000Error: expected "2002917506 ", got "2521713553 "stderr
2Aug 2, 2022 17:506,590119,813,21154,040,91602,232,320
3Aug 2, 2022 17:506,630122,036,42954,367,36302,232,320
4Aug 2, 2022 17:506,649119,957,82054,520,09502,269,184
5Aug 2, 2022 17:496,784111,502,63255,625,12502,228,224
6Aug 2, 2022 17:496,884113,232,26056,448,54402,228,224
7Aug 2, 2022 17:496,932118,074,25556,843,89102,215,936