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 07:25Bernard 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 07:2500000Error: expected "2038557435 ", got "1"
2Nov 20, 2022 07:2500000Error: expected "2065535592 ", got "1"
3Nov 20, 2022 07:2500000Error: expected "2302594608 ", got "1"
4Nov 20, 2022 07:2500000Error: expected "2120458090 ", got "2"
5Nov 20, 2022 07:2500000Error: expected "2215221197 ", got "1"
6Nov 20, 2022 07:2500000Error: expected "2258007653 ", got "1"
7Nov 20, 2022 07:2500000Error: expected "2020335641 ", got "1"
8Nov 20, 2022 07:2600000Error: expected "2227067032 ", got "1"
9Nov 20, 2022 07:266,947114,373,24256,967,09602,199,552
10Nov 20, 2022 07:257,016145,110,25957,528,20702,293,760
11Nov 20, 2022 07:257,036119,088,37757,692,94602,236,416
12Nov 20, 2022 07:257,499126,138,72761,494,82702,273,280
13Nov 20, 2022 07:267,505123,492,46561,538,08502,187,264
14Nov 20, 2022 07:267,619124,639,31862,478,11002,191,360