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:45Karthik 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:470719,924,980709,610,0001,165,0002,117,632expected "1994070551 ", got "1:71 2:64 5:320 10:648 25:580 50:107 75:169 90:86 | M 1994070551 w100k 8789999 "
2Oct 2, 2026 22:470742,020,926731,752,0001,003,0002,117,632expected "2037174962 ", got "1:51 2:743 5:828 10:1064 25:897 50:671 75:137 90:127 | M 2037174962 w100k 8291477 "
3Oct 2, 2026 22:470738,467,012728,298,0001,150,0002,117,632expected "2208786839 ", got "1:428 2:323 5:69 10:34 25:344 50:219 75:7 90:76 | M 2208786839 w100k 8650373 "