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 listFeb 1, 2025 16:11spacecat8086spacecat8086Score: 975,544Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 1, 2025 16:11968,5137,975,777,1267,736,969,000204,840,0002,281,472
2Feb 1, 2025 16:11972,1208,005,305,6197,770,529,000200,858,0002,281,472
3Feb 1, 2025 16:11972,8948,006,282,0847,773,894,000203,839,0002,277,376
4Feb 1, 2025 16:11973,1708,016,246,0877,778,143,000201,848,0002,428,928
5Feb 1, 2025 16:11975,5448,034,992,6317,790,630,000208,829,0002,281,472
6Feb 1, 2025 16:11976,5408,046,215,9957,805,791,000201,839,0002,367,488
7Feb 1, 2025 16:11977,2228,047,232,6617,817,365,000195,858,0002,281,472
8Feb 1, 2025 16:11977,6698,045,229,5347,813,041,000203,844,0002,293,760
9Feb 1, 2025 16:11978,6938,061,874,8827,827,425,000197,859,0002,281,472