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 3, 2026 00:40Karthik 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 3, 2026 00:41016,677,0831,394,0004,857,00028,672expected "2197903352 ", got "mmap7 hp2 pop1998 touch885 rss390628 fpmd0 spmd348160 s1 [] "
2Oct 3, 2026 00:41018,579,5671,405,0006,734,00028,672expected "2235461167 ", got "mmap6 hp2 pop3196 touch901 rss390628 fpmd0 spmd319488 s0 [] "
3Oct 3, 2026 00:41014,615,4461,541,0001,921,00028,672expected "2260677184 ", got "mmap7 hp2 pop202 touch878 rss390628 fpmd0 spmd389120 s1 [] "