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 12, 2021 22:03Yuriy LyfenkoYuriy LyfenkoScore: 121,337Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2021 22:0491,319803,460,337748,818,65302,224,128
2Jun 12, 2021 22:0491,516813,532,716750,435,22002,215,936
3Jun 12, 2021 22:03100,460883,735,570823,768,37902,220,032
4Jun 12, 2021 22:04108,440944,378,791889,206,66002,220,032
5Jun 12, 2021 22:04118,1271,031,499,462968,644,27102,228,224
6Jun 12, 2021 22:04120,6701,039,766,214989,497,66102,228,224
7Jun 12, 2021 22:04121,3371,057,500,782994,959,52102,220,032
8Jun 12, 2021 22:03124,6981,085,255,2751,022,524,86902,211,840
9Jun 12, 2021 22:04124,9881,084,029,3531,024,904,11102,215,936
10Jun 12, 2021 22:04129,9821,148,917,3241,065,851,55702,215,936
11Jun 12, 2021 22:04138,5481,206,313,8541,136,092,95102,220,032
12Jun 12, 2021 22:03140,1961,209,209,7901,149,604,53002,224,128