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 22, 2024 11:01Huy Duc LeHuy Duc LeScore: 11,197Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 22, 2024 11:019,581147,838,59478,564,03802,228,224
2Feb 22, 2024 11:0110,459113,833,77366,814,00018,947,0002,465,792
3Feb 22, 2024 11:0110,608112,018,59369,987,00016,996,0002,334,720
4Feb 22, 2024 11:0110,680117,715,79273,484,00014,092,0002,441,216
5Feb 22, 2024 11:0110,704144,277,12387,774,67402,277,376
6Feb 22, 2024 11:0110,873115,993,82068,122,00021,037,0002,375,680
7Feb 22, 2024 11:0111,197121,884,09473,851,00017,963,0002,449,408
8Feb 22, 2024 11:0111,292153,270,24592,595,01702,224,128
9Feb 22, 2024 11:0111,496116,394,02880,230,00014,040,0002,330,624
10Feb 22, 2024 11:0111,654120,067,98977,458,00018,107,0002,363,392
11Feb 22, 2024 11:0111,721122,446,87479,090,00017,019,0002,342,912
12Feb 22, 2024 11:0111,738119,157,75476,200,00020,052,0002,469,888