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 10:06Huy Duc LeHuy Duc LeError
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 10:0900000Error: No answer to stdout. Died or killed?stderr
2Feb 21, 2024 10:068,77898,416,95062,982,0008,997,0002,461,696
3Feb 21, 2024 10:069,300139,870,02476,259,54802,183,168
4Feb 21, 2024 10:069,541103,394,01363,191,00015,045,0002,514,944
5Feb 21, 2024 10:069,757103,683,27068,005,00012,000,0002,523,136
6Feb 21, 2024 10:069,812108,733,22065,370,00015,085,0002,367,488
7Feb 21, 2024 10:0910,021141,904,97382,170,31902,252,800
8Feb 21, 2024 10:0610,061105,308,58069,421,00013,079,0002,469,888
9Feb 21, 2024 10:0910,256151,130,38084,098,98302,207,744
10Feb 21, 2024 10:0610,352107,141,98060,920,00023,968,0002,306,048
11Feb 21, 2024 10:0610,655114,113,83372,305,00015,063,0002,363,392
12Feb 21, 2024 10:0610,894116,986,16577,288,00012,044,0002,281,472
13Feb 21, 2024 10:0611,015165,450,82890,320,79502,301,952
14Feb 21, 2024 10:0911,910162,522,97297,662,54502,207,744
15Feb 21, 2024 10:0611,945158,040,98997,952,58202,297,856
16Feb 21, 2024 10:0611,960122,110,41784,060,00014,010,0002,338,816