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 21:05Andrey TsvetkovAndrey TsvetkovScore: 145,734Success
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:2885,794769,241,717703,511,38702,191,360
2Jun 20, 2021 13:28107,586956,801,622882,206,78202,310,144
3Jun 20, 2021 21:15112,811992,032,773925,053,27702,289,664
4Jun 20, 2021 21:08118,7441,035,117,807973,704,60502,232,320
5Jun 20, 2021 21:08121,4411,056,848,836995,818,77202,248,704
6Jun 20, 2021 21:05128,0771,269,084,9161,050,230,08502,334,720
7Jun 20, 2021 21:15145,7341,903,156,8421,195,022,31803,375,104
8Jun 20, 2021 13:28150,7163,868,945,1991,235,867,66702,273,280
9Jun 20, 2021 21:05176,3484,864,246,4541,446,054,33702,281,472
10Jun 20, 2021 21:05277,98014,194,468,1232,279,437,31302,297,856
11Jun 20, 2021 21:15321,03514,828,959,0142,632,485,27802,252,800
12Jun 20, 2021 21:08365,65617,007,419,9842,998,380,97202,199,552