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 5, 2024 14:24Andrey LikhachevAndrey LikhachevError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 5, 2024 14:2400000Error: No answer to stdout. Died or killed?stderr
2Jan 5, 2024 14:2400000Error: expected "2194731379 ", got "2194731364"stderr
3Jan 5, 2024 14:24167,6313,135,683,4221,374,578,2500479,232
4Jan 5, 2024 14:24241,5635,526,010,6781,980,815,4260438,272
5Jan 5, 2024 14:24241,8766,962,103,2611,983,386,1710405,504