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 21, 2024 13:58Huy Duc LeHuy Duc LeScore: 11,287Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2024 13:589,031130,358,20074,057,70302,289,664
2Feb 21, 2024 13:589,096101,638,73662,490,00012,094,0002,498,560
3Feb 21, 2024 13:5810,338112,153,60663,829,00020,944,0002,453,504
4Feb 21, 2024 13:5810,342111,317,09066,847,00017,959,0002,347,008
5Feb 21, 2024 13:5810,527112,745,37667,251,00019,071,0002,502,656
6Feb 21, 2024 13:5811,283161,155,63292,523,12502,220,032
7Feb 21, 2024 13:5811,287157,583,62092,554,43802,260,992
8Feb 21, 2024 13:5811,318119,349,88268,855,00023,949,0002,326,528
9Feb 21, 2024 13:5811,572125,378,01773,915,00020,975,0002,347,008
10Feb 21, 2024 13:5811,921126,043,52577,804,00019,949,0002,494,464
11Feb 21, 2024 13:5811,973124,019,52979,146,00019,035,0002,281,472
12Feb 21, 2024 13:5812,290132,795,47077,830,00022,950,0002,473,984