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 22, 2024 11:17Huy Duc LeHuy Duc LeError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 22, 2024 11:1700000Error: expected "2250451971 ", got "2219999977 "stderr
2Feb 22, 2024 11:1800000Error: No answer to stdout. Died or killed?stderr
3Feb 22, 2024 11:185,886107,352,15548,262,61302,248,704
4Feb 22, 2024 11:186,042117,202,05449,545,43502,244,608
5Feb 22, 2024 11:196,479112,695,72253,129,12702,191,360
6Feb 22, 2024 11:196,720125,401,54755,102,52802,215,936
7Feb 22, 2024 11:186,743123,299,74455,296,05002,240,512
8Feb 22, 2024 11:196,896120,014,02956,550,31302,179,072