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:51Matt 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 09:4500000Error: No answer to stdout. Died or killed?
2Nov 7, 2024 09:51479,0543,959,300,3653,779,344,000148,895,0002,531,328
3Nov 7, 2024 09:51494,1854,080,027,7393,900,416,000151,899,0002,445,312
4Nov 7, 2024 09:51495,9744,100,493,1963,946,079,000120,910,0002,510,848
5Nov 7, 2024 09:51502,4864,149,670,0993,968,482,000151,903,0002,371,584
6Nov 7, 2024 09:51505,0444,177,831,9974,008,446,000132,915,0002,510,848
7Nov 7, 2024 09:51506,4484,179,768,1933,996,990,000155,882,0002,502,656
8Nov 7, 2024 09:51508,9864,203,021,6554,025,768,000147,917,0002,285,568
9Nov 7, 2024 09:51516,4694,264,632,4614,099,143,000135,905,0002,412,544
10Nov 7, 2024 09:51529,7164,375,556,2154,209,771,000133,897,0002,285,568