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 listOct 18, 2024 17:37Sybrand AarnoutseSybrand AarnoutseScore: 261,727Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 18, 2024 17:37136,4401,314,989,708739,211,000379,594,0002,506,752
2Oct 18, 2024 17:37144,9771,363,771,538769,528,000419,287,0002,486,272
3Oct 18, 2024 17:37169,4491,678,291,591799,003,000590,480,0002,494,464
4Oct 18, 2024 17:37205,4862,136,431,234859,992,000824,993,0002,465,792
5Oct 18, 2024 17:37261,7275,540,289,316889,554,0001,256,608,0002,453,504
6Oct 18, 2024 17:37279,8813,404,696,8741,097,231,0001,197,794,0002,408,448
7Oct 18, 2024 17:37327,5283,751,075,0521,274,383,0001,411,350,0002,420,736
8Oct 18, 2024 17:37367,6556,727,597,8091,288,011,0001,726,762,0002,482,176
9Oct 18, 2024 17:37579,22413,632,880,7981,625,747,0003,123,886,0002,318,336