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 8, 2024 23:48Hayden DonnellyHayden DonnellyScore: 970,971Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 8, 2024 23:48967,5127,965,110,8477,745,726,000187,872,0002,297,856
2Dec 8, 2024 23:48968,0157,973,584,7337,742,879,000194,845,0002,277,376
3Dec 8, 2024 23:48968,7657,974,819,9327,750,001,000193,874,0002,297,856
4Dec 8, 2024 23:48969,6067,987,005,3517,756,900,000193,872,0002,277,376
5Dec 8, 2024 23:48970,9717,998,588,1767,774,107,000187,857,0002,445,312
6Dec 8, 2024 23:48972,4518,009,123,9277,774,225,000199,877,0002,277,376
7Dec 8, 2024 23:48973,1628,010,910,2497,774,087,000205,843,0002,310,144
8Dec 8, 2024 23:48973,3078,008,412,7687,792,257,000188,860,0002,277,376
9Dec 8, 2024 23:48981,6818,083,836,6777,852,940,000196,848,0002,277,376