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 17, 2023 00:31Yuriy 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 17, 2023 00:3100000Error: No answer to stdout. Died or killed?stderr
2Jul 17, 2023 00:3100000Error: expected "2107123503 ", got "2147483648 "stderr
3Jul 17, 2023 00:3200000Error: expected "2175497002 ", got "2147483648 "stderr
4Jul 17, 2023 00:3500000Error: expected "2158481570 ", got "2147483648 "stderr
5Jul 17, 2023 00:3600000Error: No answer to stdout. Died or killed?stderr
6Jul 17, 2023 00:3600000Error: No answer to stdout. Died or killed?stderr
7Jul 17, 2023 00:3600000Error: expected "2044588869 ", got "2147483648 "stderr
8Jul 17, 2023 00:3600000Error: No answer to stdout. Died or killed?stderr
9Jul 17, 2023 00:3600000Error: expected "2119350080 ", got "2147483648 "stderr
10Jul 17, 2023 00:344,162590,247,58034,128,54402,289,664
11Jul 17, 2023 00:344,170592,069,91034,197,06102,310,144
12Jul 17, 2023 00:344,198591,962,81634,420,38502,297,856