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 listJul 9, 2021 13: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
1Jun 13, 2021 20:5400000Error: expected "1923971092 ", got "4294967295 "stderr
2Jun 13, 2021 20:5349,802469,605,464408,372,39602,256,896
3Jun 13, 2021 20:5149,986467,866,206409,887,87802,260,992
4Jul 9, 2021 13:3450,151482,361,177411,237,41002,211,840
5Jun 13, 2021 20:5350,254473,345,420412,078,86002,277,376
6Jul 9, 2021 13:4150,494499,230,310414,048,80402,236,416
7Jun 13, 2021 20:5150,547470,322,868414,487,99202,269,184
8Jun 13, 2021 20:5151,064481,983,726418,724,12902,285,568
9Jun 13, 2021 20:5351,360481,848,471421,150,41102,228,224
10Jun 13, 2021 20:5351,396491,502,012421,444,49502,244,608
11Jul 9, 2021 13:4152,306484,282,393428,905,42102,285,568
12Jul 9, 2021 13:3452,355490,022,685429,314,04002,232,320
13Jul 9, 2021 13:3452,383496,018,539429,543,38402,281,472
14Jun 13, 2021 20:5352,545502,941,776430,866,82502,220,032
15Jun 13, 2021 20:5354,084502,231,624443,490,34802,281,472
16Jul 9, 2021 13:4154,829515,477,620449,594,30802,269,184