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 listNov 7, 2024 15:58Matt StuchlikMatt StuchlikError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 7, 2024 16:0000000Error: Exit with code 1: Index out of bounds: 5607497 Filtered size: 4649893stderr
2Nov 7, 2024 16:1100000Error: Exit with code 1: Index out of bounds: 4294035272 Filtered size: 1760958stderr
3Nov 7, 2024 16:1000000Error: Exit with code 1: Index out of bounds: 3485709 Filtered size: 962238stderr
4Nov 7, 2024 16:0900000Error: Exit with code 1: Index out of bounds: 2551053 Filtered size: 827556stderr
5Nov 7, 2024 16:0900000Error: Exit with code 1: Index out of bounds: 4294096318 Filtered size: 928493stderr
6Nov 7, 2024 16:0700000Error: Exit with code 1: Index out of bounds: 717453 Filtered size: 563072stderr
7Nov 7, 2024 16:0600000Error: Exit with code 1: Index out of bounds: 4293574325 Filtered size: 617335stderr
8Nov 7, 2024 16:0300000Error: Exit with code 1: Index out of bounds: 202006 Filtered size: 16521stderr
9Nov 7, 2024 16:0200000Error: Exit with code 1: Index out of bounds: 5665364 Filtered size: 4603427stderr
10Nov 7, 2024 16:0000000Error: Exit with code 1: Index out of bounds: 6737945 Filtered size: 4477372stderr
11Nov 7, 2024 15:5900000Error: Exit with code 1: Index out of bounds: 5554663 Filtered size: 4771003stderr
12Nov 7, 2024 15:5600000Error: Exit with code 1: Index out of bounds: 5479959 Filtered size: 4560632stderr
13Nov 7, 2024 15:5500000Error: Exit with code 1: Index out of bounds: 5196219 Filtered size: 4991046stderr
14Nov 7, 2024 15:5882,341703,886,568660,196,00015,004,0002,326,528
15Nov 7, 2024 15:5883,176708,651,920666,042,00016,001,0002,318,336
16Nov 7, 2024 15:5885,943733,118,664682,744,00021,991,0002,367,488
17Nov 7, 2024 15:5886,303733,879,009686,695,00020,990,0002,510,848
18Nov 7, 2024 15:5887,896748,763,335697,754,00022,991,0002,351,104
19Nov 7, 2024 15:5889,010763,746,550711,887,00017,997,0002,301,952