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 26, 2024 22:28Yuriy 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 26, 2024 22:3000000Error: expected "2191814342 ", got "2147182688 "stderr
2Jul 26, 2024 22:3000000Error: expected "2173191443 ", got "2147483648 "stderr
3Jul 26, 2024 22:3000000Error: expected "2198959483 ", got "2147483648 "stderr
4Jul 26, 2024 22:284,079594,543,95133,446,24002,256,896
5Jul 26, 2024 22:284,081594,327,68633,463,34402,195,456
6Jul 26, 2024 22:284,086590,376,94133,504,47202,203,648