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 listApr 20, 2024 00:13Joad 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
1Apr 20, 2024 00:1400000Error: expected "2177990826 ", got "1191167110"stderr
2Apr 20, 2024 00:1700000Error: expected "2223125082 ", got "0"stderr
3Apr 20, 2024 00:1700000Error: expected "2233958248 ", got "0"stderr
4Apr 20, 2024 00:1500000Error: expected "2232260694 ", got "0"stderr
5Apr 20, 2024 00:1500000Error: expected "2237619351 ", got "0"stderr
6Apr 20, 2024 00:1400000Error: No answer to stdout. Died or killed?stderr
7Apr 20, 2024 00:1400000Error: No answer to stdout. Died or killed?stderr
8Apr 20, 2024 00:1400000Error: No answer to stdout. Died or killed?stderr
9Apr 20, 2024 00:1400000Error: expected "2244888521 ", got "3340992391"stderr
10Apr 20, 2024 00:1400000Error: expected "2225914485 ", got "1284761759"stderr
11Apr 20, 2024 00:1400000Error: expected "2237260880 ", got "2088700830"stderr
12Apr 20, 2024 00:1100000Error: expected "2333601471 ", got "0"stderr
13Apr 20, 2024 00:1764,280604,642,957527,095,69002,244,608
14Apr 20, 2024 00:1764,334594,269,646527,535,44802,224,128
15Apr 20, 2024 00:1767,821617,293,362556,130,45002,306,048
16Apr 20, 2024 00:1373,754676,333,381604,780,73302,297,856
17Apr 20, 2024 00:1376,024685,367,357623,400,81202,265,088
18Apr 20, 2024 00:1377,814700,366,554638,070,93402,228,224