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 09:55Matt 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 15:4900000Error: Exit with code 1: Index out of boundsstderr
2Nov 7, 2024 15:4100000Error: Exit with code 1: Index out of boundsstderr
3Nov 7, 2024 15:4000000Error: Exit with code 1: Index out of boundsstderr
4Nov 7, 2024 09:5400000Error: Exit with code 1: Index out of boundsstderr
5Nov 7, 2024 09:5300000Error: Exit with code 1: Index out of boundsstderr
6Nov 7, 2024 15:4200000Error: Exit with code 1: Index out of boundsstderr
7Nov 7, 2024 15:4200000Error: Exit with code 1: Index out of boundsstderr
8Nov 7, 2024 15:4500000Error: Exit with code 1: Index out of boundsstderr
9Nov 7, 2024 15:4500000Error: Exit with code 1: Index out of boundsstderr
10Nov 7, 2024 15:4600000Error: Exit with code 1: Index out of boundsstderr
11Nov 7, 2024 15:4800000Error: Exit with code 1: Index out of boundsstderr
12Nov 7, 2024 15:4900000Error: Exit with code 1: Index out of boundsstderr
13Nov 7, 2024 15:4900000Error: Exit with code 1: Index out of boundsstderr
14Nov 7, 2024 15:4882,746706,273,504653,539,00024,982,0002,416,640
15Nov 7, 2024 15:4883,449714,923,655662,270,00022,008,0002,494,464
16Nov 7, 2024 15:4885,357730,207,538684,928,00014,998,0002,301,952
17Nov 8, 2024 07:57106,427908,549,355850,708,00021,992,0002,322,432
18Nov 8, 2024 07:57109,169924,991,666875,203,00019,981,0002,334,720
19Nov 8, 2024 07:57110,106928,689,075878,872,00023,996,0002,338,816
20Nov 7, 2024 09:55120,6751,018,644,477958,550,00030,985,0002,293,760
21Nov 7, 2024 09:55121,4741,025,964,008962,120,00033,968,0002,359,296
22Nov 7, 2024 09:55122,2781,029,070,447961,693,00040,986,0002,404,352
23Nov 7, 2024 09:55123,1731,035,887,685983,043,00026,973,0002,535,424
24Nov 7, 2024 09:55126,9461,070,179,6181,008,961,00031,998,0002,289,664
25Nov 7, 2024 09:55128,2171,078,446,9811,017,401,00033,980,0002,375,680
26Nov 7, 2024 09:55128,8621,081,131,0671,025,676,00030,990,0002,293,760
27Nov 7, 2024 09:55131,3301,107,175,9091,047,908,00028,997,0002,510,848
28Nov 7, 2024 09:55132,6471,119,176,8001,053,718,00033,990,0002,461,696