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:02Huy Duc LeHuy Duc LeScore: 10,778Success
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:029,542102,285,45667,207,00011,034,0002,523,136
2Feb 21, 2024 13:029,605105,465,08860,818,00017,946,0002,347,008
3Feb 21, 2024 13:0210,060104,990,71571,424,00011,065,0002,383,872
4Feb 21, 2024 13:0210,310111,066,46466,426,00018,116,0002,523,136
5Feb 21, 2024 13:0210,360111,765,32070,962,00013,992,0002,506,752
6Feb 21, 2024 13:0210,760162,124,25288,234,39702,199,552
7Feb 21, 2024 13:0210,778109,417,38371,307,00017,073,0002,326,528
8Feb 21, 2024 13:0210,853110,554,91767,998,00020,999,0002,379,776
9Feb 21, 2024 13:0211,048117,403,17475,495,00015,099,0002,355,200
10Feb 21, 2024 13:0211,264150,576,48892,366,23402,195,456
11Feb 21, 2024 13:0211,334119,407,92882,947,0009,993,0002,535,424
12Feb 21, 2024 13:0212,298185,381,138100,841,05002,183,168