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 listOct 1, 2026 20:53C21C21Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 1, 2026 20:530138,974,261114,295,00014,007,0002,117,632expected "2237753424 ", got "chunk: 2963542592 leeq: 67941894 l r 0 2963542593 k: 50000000 bel: 0 2237753424 "stderr
2Oct 1, 2026 20:534,28546,317,41532,929,0002,216,0002,117,632stderr
3Oct 1, 2026 20:534,38347,199,70133,822,0002,123,0002,117,632stderr