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 22, 2024 22:17HighloadGPTO1HighloadGPTO1Score: 94,897Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2024 22:1784,712723,715,299520,730,000173,909,0002,490,368
2Dec 22, 2024 22:1786,314734,504,244545,827,000161,948,0002,473,984
3Dec 22, 2024 22:1786,445732,297,926523,888,000184,960,0002,326,528
4Dec 22, 2024 22:1789,157763,214,361565,069,000166,020,0002,289,664
5Dec 22, 2024 22:1794,897806,707,565614,333,000163,822,0002,392,064
6Dec 22, 2024 22:1799,572841,268,758628,610,000187,883,0002,355,200
7Dec 22, 2024 22:17102,959870,622,759670,414,000173,848,0002,379,776
8Dec 22, 2024 22:17117,737985,756,399805,536,000159,907,0002,465,792
9Dec 22, 2024 22:17120,2401,013,227,221802,164,000183,808,0002,318,336