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, 2023 19:52Franek 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
1Apr 25, 2023 19:5100000Error: No answer to stdout. Died or killed?stderr
2Apr 25, 2023 19:5800000Error: No answer to stdout. Died or killed?stderr
3Apr 25, 2023 19:5012,060174,855,10698,893,51702,187,264
4Apr 25, 2023 19:5012,234158,962,001100,314,95202,293,760
5Apr 25, 2023 19:5212,474166,327,082102,287,23102,252,800
6Apr 25, 2023 19:5012,629176,351,413103,559,08802,207,744
7Apr 25, 2023 19:5212,997155,135,543106,577,51002,236,416
8Apr 25, 2023 19:5213,093182,294,142107,362,60902,252,800