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 2, 2026 13:15Pavel 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 2, 2026 13:160151,944,413123,001,00011,000,0002,351,104expected "1912000598 ", got " "stderr
2May 2, 2026 13:1615,929153,590,504120,577,00010,048,0002,383,872stderr
3May 2, 2026 13:1616,325153,433,982121,885,00011,988,0002,416,640stderr
4May 2, 2026 13:1616,331151,799,375119,928,00013,991,0002,387,968stderr
5May 2, 2026 13:1616,565153,254,389126,851,0008,989,0002,318,336stderr
6May 2, 2026 13:1616,567155,485,612126,866,0008,990,0002,465,792stderr
7May 2, 2026 13:1616,746151,118,325121,281,00016,037,0002,383,872stderr
8May 2, 2026 13:1616,843152,645,561125,104,00013,010,0002,371,584stderr
9May 2, 2026 13:1617,076157,309,102127,028,00013,002,0002,433,024stderr