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 listJul 15, 2023 15:09Paul MasurelPaul MasurelScore: 59,011Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2023 15:094,262110,365,60334,946,89602,289,664
2Jul 15, 2023 15:094,300113,805,44535,257,45302,281,472
3Jul 15, 2023 15:0957,772549,972,104473,728,45802,252,800
4Jul 15, 2023 15:0958,287499,277,226474,957,0002,999,0002,494,464
5Jul 15, 2023 15:0958,482508,008,044476,559,0002,997,0002,478,080
6Jul 15, 2023 15:0958,741504,752,237477,677,0003,997,0002,359,296
7Jul 15, 2023 15:0959,011512,404,751479,892,0003,999,0002,400,256
8Jul 15, 2023 15:0959,015511,460,985479,923,0003,999,0002,424,832
9Jul 15, 2023 15:0959,031505,492,666481,055,0003,000,0002,359,296
10Jul 15, 2023 15:0959,043516,899,573480,148,0004,001,0002,428,928
11Jul 15, 2023 15:0959,093511,379,527480,564,0003,996,0002,494,464
12Jul 15, 2023 15:0959,109509,610,104480,698,0003,997,0002,469,888