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 listJul 16, 2023 21:23Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2023 21:2500000Error: expected "2265050600 ", got "2147483648 "stderr
2Jul 16, 2023 21:2700000Error: expected "1962813944 ", got "1694435770 "stderr
3Jul 16, 2023 21:235,235610,121,48642,926,89602,285,568
4Jul 16, 2023 21:235,314607,033,20343,577,06802,281,472
5Jul 16, 2023 21:235,392615,320,24944,218,24102,240,512