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 listAug 2, 2022 18:54Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 3, 2022 01:3600000Error: expected "2246609165 ", got "2133939265 "stderr
2Aug 3, 2022 01:2900000Error: expected "2025260867 ", got "1441943442 "stderr
3Aug 3, 2022 01:3000000Error: expected "2070069292 ", got "1807810684 "stderr
4Aug 3, 2022 01:3100000Error: No answer to stdout. Died or killed?
5Aug 3, 2022 01:3200000Error: expected "2055807834 ", got "3755006278 "stderr
6Aug 3, 2022 01:3200000Error: expected "2216305391 ", got "252690565 "stderr
7Aug 3, 2022 01:3300000Error: expected "2228904399 ", got "3837263872 "stderr
8Aug 3, 2022 01:3300000Error: No answer to stdout. Died or killed?
9Aug 3, 2022 01:3500000Error: No answer to stdout. Died or killed?
10Aug 3, 2022 01:3500000Error: No answer to stdout. Died or killed?
11Aug 2, 2022 18:5700000Error: expected "2038283875 ", got "4042847178 "stderr
12Aug 3, 2022 01:3600000Error: expected "2244556958 ", got "2147483648 "stderr
13Aug 3, 2022 01:3700000Error: expected "2051762461 ", got "139283656 "stderr
14Aug 3, 2022 01:5400000Error: expected "1977036948 ", got "3914397164 "stderr
15Aug 3, 2022 01:5800000Error: expected "2241853342 ", got "1445465958 "stderr
16Aug 3, 2022 01:5900000Error: expected "2217711518 ", got "2147483648 "stderr
17Aug 3, 2022 01:5900000Error: expected "2196088724 ", got "2147483648 "stderr
18Aug 3, 2022 01:5900000Error: expected "2227145211 ", got "2148139013 "stderr
19Aug 3, 2022 01:5900000Error: expected "2039999194 ", got "890460091 "stderr
20Aug 2, 2022 18:5600000Error: No answer to stdout. Died or killed?
21Aug 2, 2022 18:5600000Error: expected "2076913702 ", got "716912815 "stderr
22Aug 2, 2022 18:5500000Error: expected "2074040933 ", got "3466214317 "stderr
23Aug 2, 2022 18:5500000Error: expected "2025660676 ", got "2785192589 "stderr
24Aug 2, 2022 18:5400000Error: expected "2074129641 ", got "3064806728 "stderr
25Aug 2, 2022 18:5400000Error: expected "2028698483 ", got "2008222648 "stderr
26Aug 2, 2022 18:5400000Error: expected "2058427146 ", got "2146728192 "stderr
27Aug 3, 2022 01:304,906103,515,46740,229,22402,215,936
28Aug 2, 2022 18:574,920120,431,32340,341,56002,228,224
29Aug 2, 2022 18:574,926110,790,37840,395,52002,224,128
30Aug 3, 2022 01:314,942105,957,32440,523,81402,224,128
31Aug 3, 2022 01:594,945101,125,97840,546,05002,224,128
32Aug 3, 2022 01:594,945103,094,67340,552,02202,224,128
33Aug 2, 2022 18:574,960112,383,37540,675,84902,224,128
34Aug 3, 2022 01:594,961105,591,88640,682,24802,220,032
35Aug 3, 2022 01:305,118111,611,39541,963,92802,224,128
36Aug 3, 2022 01:315,126103,303,90642,033,76702,220,032
37Aug 3, 2022 01:305,141102,237,94442,154,50202,248,704
38Aug 3, 2022 01:315,170114,634,50942,391,35502,232,320