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 listApr 25, 2026 05:27limanjun99limanjun99Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 25, 2026 05:270371,666,813346,815,0005,996,0002,318,336expected "2124439768 ", got "Warning: the loose bound is not tight enough. Loose bound: [2064046803, 2122139852], Median: 2124439768 "
2Apr 25, 2026 05:270352,646,151330,072,0005,001,0002,465,792expected "1913863155 ", got "Warning: the tight bound is not tight enough. Tight bound: [1916122651, 1919275868], Median: 1913863155 "
3Apr 25, 2026 05:270379,641,712358,851,0004,997,0002,314,240expected "2069342918 ", got "Warning: the tight bound is not tight enough. Tight bound: [2069638206, 2072492915], Median: 2069342918 "