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 listSep 10, 2022 17:38eldon-chungeldon-chungError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 10, 2022 17:3800000Error: expected "2239059792 ", got "2282892874 "stderr
2Sep 10, 2022 17:3823,326255,833,495191,271,80902,236,416
3Sep 10, 2022 17:3823,461264,048,440192,379,47802,265,088
4Sep 10, 2022 17:3824,023258,448,125196,990,49802,301,952
5Sep 10, 2022 17:3824,037253,175,593197,105,82802,269,184
6Sep 10, 2022 17:3824,070251,368,642197,378,05602,277,376
7Sep 10, 2022 17:3824,273265,697,956199,040,77302,289,664
8Sep 10, 2022 17:3824,284271,839,681199,128,31402,306,048
9Sep 10, 2022 17:3824,349265,946,677199,658,03302,285,568
10Sep 10, 2022 17:3824,411271,569,345200,169,87102,228,224