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 listMay 30, 2024 19:21Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 30, 2024 19:3400000Error: No answer to stdout. Died or killed?stderr
2May 30, 2024 19:3100000Error: expected "2203093586 ", got "0"stderr
3May 30, 2024 19:3100000Error: No answer to stdout. Died or killed?stderr
4May 30, 2024 19:3100000Error: expected "2227497745 ", got "3090980412"stderr
5May 30, 2024 19:3100000Error: No answer to stdout. Died or killed?
6May 30, 2024 19:3100000Error: No answer to stdout. Died or killed?stderr
7May 30, 2024 19:3100000Error: No answer to stdout. Died or killed?
8May 30, 2024 19:3100000Error: expected "2191685014 ", got "0"stderr
9May 30, 2024 19:3100000Error: expected "2242512653 ", got "1528825356"stderr
10May 30, 2024 19:3400000Error: expected "2281130536 ", got "187920471"stderr
11May 30, 2024 19:3400000Error: No answer to stdout. Died or killed?stderr
12May 30, 2024 19:3400000Error: No answer to stdout. Died or killed?
13May 30, 2024 19:3400000Error: No answer to stdout. Died or killed?stderr
14May 30, 2024 19:344,38294,010,26135,934,64902,224,128
15May 30, 2024 19:345,453113,691,94244,711,71902,224,128
16May 30, 2024 19:345,681112,761,38546,581,89202,215,936
17May 30, 2024 19:216,28979,432,29544,492,0007,078,0002,338,816
18May 30, 2024 19:216,80686,785,89647,837,0007,972,0002,408,448
19May 30, 2024 19:217,162128,056,24758,728,31302,236,416
20May 30, 2024 19:217,260133,676,56859,530,75302,244,608
21May 30, 2024 19:217,47384,812,87054,248,0007,032,0002,510,848
22May 30, 2024 19:217,68982,329,48255,043,0008,006,0002,502,656
23May 30, 2024 19:218,05092,714,95358,012,0008,001,0002,297,856
24May 30, 2024 19:218,14893,094,10858,835,0007,977,0002,351,104
25May 30, 2024 19:218,56192,352,35362,176,0008,022,0002,498,560
26May 30, 2024 19:218,66592,717,64463,050,0008,006,0002,510,848
27May 30, 2024 19:219,05996,382,98567,255,0007,026,0002,469,888
28May 30, 2024 19:219,893154,416,91281,125,36702,236,416