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 listJun 20, 2021 13:04Andrey TsvetkovAndrey TsvetkovScore: 107,057Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 20, 2021 13:1478,571708,809,455644,282,51602,310,144
2Jun 20, 2021 13:0681,790734,353,695670,680,42402,310,144
3Jun 20, 2021 13:0383,716749,258,253686,471,33602,314,240
4Jun 20, 2021 13:1491,745816,873,933752,311,03002,187,264
5Jun 20, 2021 13:0594,838844,390,192777,670,90102,187,264
6Jun 20, 2021 13:0495,996852,901,612787,164,75302,314,240
7Jun 20, 2021 13:1597,128859,125,763796,448,83302,183,168
8Jun 20, 2021 13:0398,951873,333,960811,396,35102,310,144
9Jun 20, 2021 13:06103,946907,550,987852,358,76702,187,264
10Jun 20, 2021 13:04106,076944,545,522869,826,66602,306,048
11Jun 20, 2021 13:04107,057931,896,497877,870,08302,310,144
12Jun 20, 2021 13:05107,069930,129,671877,969,61502,199,552
13Jun 20, 2021 13:15107,995949,892,101885,561,38102,306,048
14Jun 20, 2021 13:04108,392949,312,560888,818,14202,306,048
15Jun 20, 2021 13:04108,671963,279,410891,103,55602,314,240
16Jun 20, 2021 13:15112,137983,290,783919,520,13302,203,648
17Jun 20, 2021 13:06116,0311,023,473,133951,453,90802,297,856
18Jun 20, 2021 13:05119,5361,048,313,770980,194,90802,301,952
19Jun 20, 2021 13:14119,9401,047,959,891983,506,11402,310,144
20Jun 20, 2021 13:03120,4711,054,479,833987,864,95702,310,144
21Jun 20, 2021 13:04120,6961,048,186,529989,705,66102,269,184