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 3, 2026 01:24Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2026 01:24048,587,59839,537,000020,480expected "2022008535 ", got "M 1 12550 178 336448 9 4 4458 "
2Oct 3, 2026 01:242,48329,431,12220,363,000020,480
3Oct 3, 2026 01:242,48329,483,70620,366,000020,480
4Oct 3, 2026 01:242,56930,146,75720,041,0001,027,00020,480
5Oct 3, 2026 01:242,63730,619,95120,215,0001,415,00020,480
6Oct 3, 2026 01:242,63730,687,82720,177,0001,447,00020,480
7Oct 3, 2026 01:242,82933,001,50419,589,0003,610,00020,480
8Oct 3, 2026 01:242,85032,315,43419,594,0003,782,00020,480
9Oct 3, 2026 01:242,95533,257,56219,605,0004,630,00020,480