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 listMay 1, 2026 16:56Pavel SkripkinPavel SkripkinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 16:570113,973,93399,315,0001,003,0002,318,336expected "2294473424 ", got "2327641225 "
2May 1, 2026 16:5712,100116,915,00498,224,0001,002,0002,408,448
3May 1, 2026 16:5712,120112,861,77998,384,0001,003,0002,420,736
4May 1, 2026 16:5712,121112,256,55098,391,0001,003,0002,478,080
5May 1, 2026 16:5712,134120,494,30197,493,0002,010,0002,318,336
6May 1, 2026 16:5712,148116,222,68397,624,0001,992,0002,416,640
7May 1, 2026 16:5712,182114,683,94497,900,0001,997,0002,416,640
8May 1, 2026 16:5712,185115,297,99396,927,0002,997,0002,416,640
9May 1, 2026 16:5712,195116,072,66598,002,0002,000,0002,416,640