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,763Success
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:5810,246160,048,57884,014,25302,252,800
2Feb 21, 2024 13:5810,993114,896,79079,129,00011,017,0002,461,696
3Feb 21, 2024 13:5811,222115,394,73974,019,00018,004,0002,424,832
4Feb 21, 2024 13:5811,460115,552,22873,975,00019,993,0002,285,568
5Feb 21, 2024 13:5811,650120,670,91775,418,00020,111,0002,433,024
6Feb 21, 2024 13:5811,744172,389,04096,301,95002,211,840
7Feb 21, 2024 13:5811,763119,801,37173,347,00023,109,0002,486,272
8Feb 21, 2024 13:5811,859123,576,40283,207,00014,035,0002,465,792
9Feb 21, 2024 13:5812,032157,031,26198,661,33802,187,264
10Feb 21, 2024 13:5812,067124,034,41478,963,00019,990,0002,351,104
11Feb 21, 2024 13:5812,553128,157,93684,948,00017,989,0002,494,464
12Feb 21, 2024 13:5812,555129,321,71788,960,00013,993,0002,416,640