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 listJan 15, 2025 19:37Ian MckibbenIan MckibbenScore: 28,874Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 15, 2025 19:3728,177256,419,794228,053,0003,000,0002,519,040
2Jan 15, 2025 19:3728,409253,353,266230,956,0001,999,0002,338,816
3Jan 15, 2025 19:3728,482261,500,751232,550,0001,002,0002,269,184
4Jan 15, 2025 19:3728,826263,886,327235,370,0001,001,0002,355,200
5Jan 15, 2025 19:3728,874260,271,514235,770,000999,0002,510,848
6Jan 15, 2025 19:3729,112264,310,821236,720,0001,997,0002,531,328
7Jan 15, 2025 19:3729,505267,499,779240,939,000999,0002,510,848
8Jan 15, 2025 19:3729,578268,890,799241,536,0001,002,0002,510,848
9Jan 15, 2025 19:3729,876273,103,386242,982,0001,999,0002,269,184