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 11, 2024 07:01Matt 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 11, 2024 07:0800000Error: No answer to stdout. Died or killed?stderr
2Nov 11, 2024 07:0800000Error: No answer to stdout. Died or killed?stderr
3Nov 11, 2024 07:0600000Error: expected "2232992485 ", got "0 "stderr
4Nov 11, 2024 07:0600000Error: No answer to stdout. Died or killed?stderr
5Nov 11, 2024 07:0500000Error: expected "2229289142 ", got "0 "stderr
6Nov 11, 2024 07:0400000Error: expected "2292573349 ", got "0 "stderr
7Nov 11, 2024 07:0400000Error: expected "2239483975 ", got "0 "stderr
8Nov 11, 2024 07:0200000Error: expected "2332508322 ", got "0 "stderr
9Nov 11, 2024 07:0000000Error: No answer to stdout. Died or killed?stderr
10Nov 11, 2024 07:028,26892,472,22262,815,0004,985,0002,449,408
11Nov 11, 2024 07:098,32494,969,56062,234,0006,022,0002,523,136
12Nov 11, 2024 07:098,34496,609,93361,380,0007,043,0002,334,720
13Nov 11, 2024 07:028,61296,575,13564,564,0006,052,0002,293,760
14Nov 11, 2024 07:029,073100,417,48064,342,00010,053,0002,359,296
15Nov 11, 2024 07:029,07495,575,53769,377,0005,027,0002,416,640
16Nov 11, 2024 07:029,471110,476,64268,586,0009,077,0002,355,200
17Nov 11, 2024 07:029,492105,562,31871,772,0006,065,0002,306,048
18Nov 11, 2024 07:029,793103,798,46770,263,00010,037,0002,523,136
19Nov 11, 2024 07:029,978110,124,41473,838,0007,982,0002,523,136
20Nov 11, 2024 07:0910,050103,905,78777,383,0005,024,0002,310,144
21Nov 11, 2024 07:0210,465109,398,91679,825,0005,986,0002,510,848
22Nov 11, 2024 07:0112,081123,847,80089,057,00010,006,0002,449,408
23Nov 11, 2024 07:0113,163133,808,406100,939,0006,995,0002,330,624
24Nov 11, 2024 07:0114,327142,628,508106,434,00011,045,0002,498,560