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 8, 2024 08:41Matt 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 8, 2024 08:4100000Error: Exit with code 1: Index out of boundsstderr
2Nov 8, 2024 08:4000000Error: Exit with code 1: Index out of boundsstderr
3Nov 8, 2024 08:4000000Error: Exit with code 1: Index out of boundsstderr
4Nov 8, 2024 08:0700000Error: Exit with code 1: Index out of boundsstderr
5Nov 8, 2024 08:0700000Error: Exit with code 1: Index out of boundsstderr
6Nov 8, 2024 08:0600000Error: Exit with code 1: Index out of boundsstderr
7Nov 8, 2024 08:0500000Error: Exit with code 1: Index out of boundsstderr
8Nov 8, 2024 08:4146,570414,819,265359,884,00021,992,0002,379,776
9Nov 8, 2024 08:0850,197439,126,147388,639,00022,978,0002,322,432
10Nov 8, 2024 08:0850,804446,452,788395,617,00020,979,0002,371,584
11Nov 8, 2024 08:0851,534448,286,475405,595,00016,983,0002,437,120
12Nov 8, 2024 08:0851,860453,842,880404,244,00021,012,0002,535,424
13Nov 8, 2024 08:0851,877459,313,661404,371,00021,019,0002,461,696
14Nov 8, 2024 08:4152,100457,395,984403,204,00024,012,0002,347,008
15Nov 8, 2024 08:0852,208452,410,321397,098,00031,007,0002,457,600
16Nov 8, 2024 08:0852,680456,935,086411,977,00019,998,0002,420,736
17Nov 8, 2024 08:4152,802458,485,035408,978,00023,998,0002,428,928
18Nov 8, 2024 08:0853,538471,224,008420,013,00019,000,0002,449,408
19Nov 8, 2024 08:0853,574467,303,397416,289,00023,015,0002,379,776