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 listApr 25, 2026 06:38limanjun99limanjun99Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 25, 2026 06:39055,497,76934,629,0002,037,0002,342,912expected "2235920401 ", got "2235920401median:7347372,sampling:105564436,tight_bound:9026188,loose_bound:853924,"
2Apr 25, 2026 06:39055,294,92234,036,0003,003,0002,392,064expected "2215141536 ", got "2215141536median:7944712,sampling:106273276,tight_bound:8848664,loose_bound:859044,"
3Apr 25, 2026 06:39053,310,65933,759,0002,046,0002,301,952expected "2134552324 ", got "2134552324median:5197188,sampling:104620676,tight_bound:9146252,loose_bound:860584,"