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 listNov 27, 2026 08:06janwwwjanwwwError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 27, 2026 08:0601,160,466,9031,150,849,0002,090,00020,480Exit with code 1: P1 start=0.522 map=0.191 bytes=400000000 sample=1.106 ms exact=281.833 ms median=2149631851 bracket=[2141192192,2154299391] width_ppm=3052 contains=1 less_lo=49803820 in=304324 (rank N/2 needs less<=50000000<less+in) input min=54 max=...stderr