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 20, 2022 16:45Bernard 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 20, 2022 16:4500000Error: expected "2010026674 ", got "1"
2Nov 20, 2022 16:4500000Error: expected "2040633689 ", got "1"
3Nov 20, 2022 16:4500000Error: expected "2226220156 ", got "1"
4Nov 20, 2022 16:4500000Error: expected "2049929726 ", got "1"
5Nov 20, 2022 16:4500000Error: expected "2175061931 ", got "2"
6Nov 20, 2022 16:4500000Error: expected "2257061877 ", got "1"
7Nov 20, 2022 16:4500000Error: expected "2109816583 ", got "2"
8Nov 20, 2022 16:4500000Error: expected "2262133714 ", got "1"
9Nov 20, 2022 16:4500000Error: expected "2295320873 ", got "1"
10Nov 20, 2022 16:4500000Error: expected "2184108197 ", got "2"
11Nov 20, 2022 16:474,926118,161,44240,393,20202,248,704
12Nov 20, 2022 16:475,032119,787,45041,259,62802,256,896
13Nov 20, 2022 16:475,064118,570,22541,525,09702,207,744