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 listMar 1, 2023 01:49Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 1, 2023 01:4900000Error: expected "2382757986 ", got "Out of range. Balance: 11380747. Count: 10150725 0"stderr
2Mar 1, 2023 01:5000000Error: expected "2161131059 ", got "2161131060"stderr
3Mar 1, 2023 01:5100000Error: expected "2281314473 ", got "Out of range. Balance: 5986390. Count: 10178970 0"stderr