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 listDec 19, 2024 09:23eldon-chungeldon-chungScore: 960,019Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 19, 2024 09:23954,0507,853,366,0017,634,378,000188,836,0002,289,664
2Dec 19, 2024 09:22956,3627,876,714,1427,650,337,000191,832,0002,297,856
3Dec 19, 2024 09:24956,4537,879,644,0447,652,084,000190,827,0002,277,376
4Dec 19, 2024 09:22959,3387,895,778,5937,667,731,000198,837,0002,277,376
5Dec 19, 2024 09:24960,0197,903,854,1197,682,322,000189,834,0002,281,472
6Dec 19, 2024 09:24963,1197,926,194,9047,706,728,000190,844,0002,404,352
7Dec 19, 2024 09:22963,4947,930,249,5897,711,804,000188,848,0002,277,376
8Dec 19, 2024 09:23965,6707,952,560,6727,732,674,000185,823,0002,412,544
9Dec 19, 2024 09:23967,1367,966,276,4057,743,670,000186,847,0002,277,376