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 1, 2026 17:12C21C21Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 1, 2026 17:13093,700,71277,291,0005,186,0002,117,632expected "2181556495 ", got "3168357181 "stderr
2Oct 1, 2026 17:13038,562,13925,908,0002,070,0002,117,632expected "2154632881 ", got "2164925269 "stderr
3Oct 1, 2026 17:13093,406,44177,484,0005,290,0002,117,632expected "2244830676 ", got "3190556933 "stderr