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 9, 2026 07:51Pavel 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 9, 2026 07:53063,062,75639,117,0009,174,0002,502,656expected "2278024928 ", got " "
2May 9, 2026 07:535,84160,538,95438,977,0008,927,0002,494,464
3May 9, 2026 07:535,88063,423,36339,256,0008,967,0002,404,352
4May 9, 2026 07:535,95864,153,70939,698,0009,164,0002,453,504
5May 9, 2026 07:535,95961,456,24340,035,0008,836,0002,461,696
6May 9, 2026 07:536,02766,451,73740,024,0009,402,0002,482,176
7May 9, 2026 07:536,20064,335,01440,841,00010,002,0002,387,968
8May 9, 2026 07:536,31266,705,62442,022,0009,741,0002,510,848
9May 9, 2026 07:536,47065,153,70642,563,00010,491,0002,510,848