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 12:53Andrey TsvetkovAndrey TsvetkovScore: 104,213Success
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 12:5281,884729,043,746671,446,77902,195,456
2Jun 20, 2021 12:5484,500761,218,785692,896,45902,240,512
3Jun 20, 2021 12:5488,362786,779,026724,566,14402,211,840
4Jun 20, 2021 12:5193,795829,586,008769,121,88302,199,552
5Jun 20, 2021 12:5194,699833,342,585776,533,95802,215,936
6Jun 20, 2021 12:5498,999875,666,654811,789,25502,211,840
7Jun 20, 2021 12:52101,017891,414,164828,335,95402,203,648
8Jun 20, 2021 12:52102,431906,094,366839,931,23602,199,552
9Jun 20, 2021 12:52103,739909,614,922850,662,91202,207,744
10Jun 20, 2021 12:53104,213950,007,122854,546,45302,207,744
11Jun 20, 2021 12:52104,257912,650,035854,906,19402,199,552
12Jun 20, 2021 12:51107,979952,368,244885,430,12502,199,552
13Jun 20, 2021 12:53110,325976,442,737904,666,18302,211,840
14Jun 20, 2021 12:53113,296996,873,436929,028,89702,199,552
15Jun 20, 2021 12:52114,532994,355,349939,165,91002,199,552
16Jun 20, 2021 12:53120,2181,054,197,816985,789,61502,207,744
17Jun 20, 2021 12:53123,7131,070,738,3981,014,449,62102,203,648
18Jun 20, 2021 12:53134,2061,160,677,1521,100,485,62002,244,608