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:14Joad 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:1500000Error: expected "2201531128 ", got "0"stderr
2May 30, 2024 19:1900000Error: No answer to stdout. Died or killed?stderr
3May 30, 2024 19:1900000Error: expected "2194526744 ", got "0"stderr
4May 30, 2024 19:1900000Error: No answer to stdout. Died or killed?stderr
5May 30, 2024 19:1900000Error: No answer to stdout. Died or killed?stderr
6May 30, 2024 19:1900000Error: expected "2216487889 ", got "2357786952"stderr
7May 30, 2024 19:1700000Error: expected "2193574176 ", got "0"stderr
8May 30, 2024 19:1700000Error: No answer to stdout. Died or killed?stderr
9May 30, 2024 19:1700000Error: No answer to stdout. Died or killed?
10May 30, 2024 19:1600000Error: No answer to stdout. Died or killed?stderr
11May 30, 2024 19:1400000Error: expected "2216717174 ", got "3857190446"stderr
12May 30, 2024 19:195,189114,104,13942,548,89602,228,224
13May 30, 2024 19:195,512108,894,59845,196,30702,224,128
14May 30, 2024 19:195,931108,417,55948,632,32302,215,936
15May 30, 2024 19:187,685129,451,45163,013,82602,244,608
16May 30, 2024 19:187,694125,330,03463,093,99102,236,416
17May 30, 2024 19:188,063126,537,41666,114,15402,240,512
18May 30, 2024 19:188,221139,285,38767,413,26202,236,416
19May 30, 2024 19:188,775153,236,46271,957,46602,232,320
20May 30, 2024 19:188,858136,328,70672,632,83202,244,608