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 07:14Huy 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 07:1400000Error: No answer to stdout. Died or killed?stderr
2Feb 21, 2024 07:1300000Error: No answer to stdout. Died or killed?stderr
3Feb 21, 2024 07:1200000Error: No answer to stdout. Died or killed?stderr
4Feb 21, 2024 07:147,780137,691,05263,799,03202,211,840
5Feb 21, 2024 07:148,49398,358,64963,585,0006,055,0002,428,928
6Feb 21, 2024 07:148,61398,535,32363,567,0007,063,0002,383,872
7Feb 21, 2024 07:148,71398,785,71661,386,00010,063,0002,269,184
8Feb 21, 2024 07:148,76097,593,68360,859,00010,974,0002,347,008
9Feb 21, 2024 07:118,820143,753,91672,324,02602,285,568
10Feb 21, 2024 07:119,051140,733,40674,222,04102,301,952
11Feb 21, 2024 07:149,281103,571,38767,091,0009,012,0002,347,008
12Feb 21, 2024 07:149,531107,959,01074,149,0004,008,0002,326,528
13Feb 21, 2024 07:149,649100,383,86367,106,00012,018,0002,338,816
14Feb 21, 2024 07:149,975105,766,15976,810,0004,987,0002,441,216
15Feb 21, 2024 07:1410,051144,384,95282,421,38002,195,456
16Feb 21, 2024 07:1410,557140,035,37186,570,38202,224,128
17Feb 21, 2024 07:1410,680115,434,99279,522,0008,052,0002,306,048
18Feb 21, 2024 07:1111,590162,786,46695,034,25202,207,744