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 listDec 19, 2024 09:30eldon-chungeldon-chungScore: 965,583Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 19, 2024 09:26956,5897,874,958,3367,646,202,000197,824,0002,277,376
2Dec 19, 2024 09:30956,6037,875,008,4847,649,319,000194,829,0002,277,376
3Dec 19, 2024 09:30958,6177,893,053,8767,670,838,000189,822,0002,277,376
4Dec 19, 2024 09:28961,8037,918,608,1007,697,933,000188,851,0002,277,376
5Dec 19, 2024 09:26961,9527,919,607,3137,701,175,000186,834,0002,277,376
6Dec 19, 2024 09:28963,2027,934,076,3177,700,427,000197,831,0002,523,136
7Dec 19, 2024 09:30963,3727,933,624,9657,709,804,000189,847,0002,277,376
8Dec 19, 2024 09:29964,6967,948,644,1977,717,666,000192,841,0002,277,376
9Dec 19, 2024 09:29964,9987,942,523,0317,719,155,000193,828,0002,277,376
10Dec 19, 2024 09:27965,3757,947,181,4557,720,247,000195,828,0002,277,376
11Dec 19, 2024 09:30965,5837,947,296,9097,718,934,000198,843,0002,269,184
12Dec 19, 2024 09:30966,0977,958,665,0247,728,170,000193,828,0002,277,376
13Dec 19, 2024 09:30966,1397,952,732,4377,729,501,000192,837,0002,277,376
14Dec 19, 2024 09:27968,4257,975,744,2817,750,248,000190,833,0002,277,376
15Dec 19, 2024 09:30968,8027,977,971,1007,749,344,000194,832,0002,277,376
16Dec 19, 2024 09:27969,1507,982,114,8477,757,196,000189,833,0002,277,376
17Dec 19, 2024 09:28969,4587,982,458,2177,748,741,000200,811,0002,277,376
18Dec 19, 2024 09:26969,9327,982,653,6727,761,599,000191,841,0002,277,376
19Dec 19, 2024 09:30969,9647,988,861,3347,755,865,000197,843,0002,277,376
20Dec 19, 2024 09:30970,6237,987,951,7627,766,276,000192,833,0002,277,376
21Dec 19, 2024 09:29971,9858,005,187,9387,772,446,000197,833,0002,277,376