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 2, 2026 22:03Karthik 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 2, 2026 22:030261,266,290251,233,0001,035,0002,113,536expected "2132153552 ", got " 100000000 99999744 2161524736 2161526783 50671478 51 9 8702 4166635703 266166737 2137209725 3127368214 1989260381 903533250 3301409058 3389792623 3444479827 3450159448 58615 59337 61181 65168 70240 73413 66166 63562 62668 ...
2Oct 2, 2026 22:030269,384,045259,342,0001,038,0002,113,536expected "2142501423 ", got " 100000000 99999744 2091941888 2091941887 48852952 0 7 6629 2468650859 3559782685 3154731204 3009725742 859857487 2903034243 1263402925 2766378480 3670928642 1607924493 61688 62855 62621 68237 64021 61715 72292 63425 61866 ...
3Oct 2, 2026 22:030266,159,169256,108,0001,009,0002,113,536expected "2175483499 ", got " 100000000 99999744 3464110080 3464114175 80691408 100 7 6370 3664372451 3834919054 3573955042 3894703525 3685348461 3983774017 3045925963 3905759369 4267457334 3576607051 62053 70755 59673 64250 65657 63144 62640 61498 624...