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 23:41Karthik 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 23:42034,045,38623,843,0001,102,0002,117,632expected "2291930016 ", got "0a7f818b8080848c7f854f3c7e8b887eb27c176680ea807e807f7a4e368080847457787d7e71747f7f92852a6023767ea386807f7f7f8082807b7ab6b3aba07e7e7f1e006b857f7d807f7f7c5e2347bc4c665c7cbfb77e807f7f3b6d7f45777f "
2Oct 2, 2026 23:42036,068,84624,653,0001,008,0002,117,632expected "2045331377 ", got "c0f4829273747f7f818387889c9780807c7e7f7f7fa5bb827f88e07f7f9cbb467f81837f7f7f7f7e7f7fba86727d817f907f7f7f7e787f7f7f7f83847e7fc7ab7fdba8827f7f7f7f7a1b753c7e7c7f70614c387f7d7e7f7e7ed39b7f7f7f8f80 "
3Oct 2, 2026 23:42033,941,83023,785,0001,092,0002,117,632expected "2170310824 ", got "7f7f72147f7f7fa1e1cba086867f366093817d7f7f7e7ff9838a701e7a1a517d7b7e7e74747f7f345a6576a5ebb4817e808198847f887f61c98689bcbc85837f7fa38b7f7f81858a375d7d7f6d2f5f5a32817d82826f728a857f7f7f77767e8d "