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 28, 2023 17:19apuxbtapuxbtError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 28, 2023 17:2100000Error: expected "2199839655 ", got "2144017993 "stderr
2Sep 28, 2023 17:2600000Error: No answer to stdout. Died or killed?stderr
3Sep 28, 2023 17:2400000Error: No answer to stdout. Died or killed?stderr
4Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
5Sep 28, 2023 17:2100000Error: expected "2155980905 ", got "2144017859 "stderr
6Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
7Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
8Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
9Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
10Sep 28, 2023 17:2100000Error: No answer to stdout. Died or killed?stderr
11Sep 28, 2023 17:1900000Error: No answer to stdout. Died or killed?stderr
12Sep 28, 2023 17:2052,262500,928,665428,552,06202,240,512
13Sep 28, 2023 17:2052,824495,896,170433,158,60302,224,128
14Sep 28, 2023 17:1952,908500,479,334433,845,17602,215,936
15Sep 28, 2023 17:2053,976515,680,509442,606,16302,187,264
16Sep 28, 2023 17:1955,106525,208,926451,868,31302,256,896
17Sep 28, 2023 17:1955,219521,652,742452,794,88202,211,840
18Sep 28, 2023 17:1955,883511,244,251458,242,10602,240,512
19Sep 28, 2023 17:1958,773556,296,405481,939,19402,306,048
20Sep 28, 2023 17:1960,722562,640,213497,916,62802,285,568