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 listNov 21, 2022 16:21Bernard TeoBernard TeoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 21, 2022 16:2100000Error: expected "2138244767 ", got "2"
2Nov 21, 2022 16:2100000Error: expected "2009434540 ", got "1"
3Nov 21, 2022 16:2100000Error: expected "2069464820 ", got "2"
4Nov 21, 2022 16:2100000Error: expected "2126552419 ", got "2"
5Nov 21, 2022 16:2100000Error: expected "2091984556 ", got "2"
6Nov 21, 2022 16:2200000Error: expected "1986650243 ", got "1"
7Nov 21, 2022 16:225,747112,419,40747,127,98102,195,456
8Nov 21, 2022 16:225,751106,761,39847,160,49402,277,376
9Nov 21, 2022 16:235,775118,602,80147,351,61302,203,648
10Nov 21, 2022 16:235,886129,964,70948,265,50502,191,360
11Nov 21, 2022 16:235,897122,779,68648,355,64702,285,568
12Nov 21, 2022 16:225,955117,496,48648,831,18902,203,648