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 listFeb 1, 2025 16:18spacecat8086spacecat8086Score: 965,656Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 1, 2025 16:18963,2787,933,255,5397,761,968,000136,911,0002,281,472
2Feb 1, 2025 16:18964,7047,938,545,1397,782,662,000127,912,0002,306,048
3Feb 1, 2025 16:18965,2627,951,125,9777,797,236,000117,912,0002,281,472
4Feb 1, 2025 16:18965,6257,945,532,9917,799,214,000118,911,0002,281,472
5Feb 1, 2025 16:18965,6567,946,689,8247,795,465,000122,912,0002,428,928
6Feb 1, 2025 16:18966,1827,958,264,1407,802,785,000119,904,0002,281,472
7Feb 1, 2025 16:18967,6777,973,155,3857,813,041,000121,907,0002,453,504
8Feb 1, 2025 16:18968,9087,977,879,6717,825,134,000119,910,0002,494,464
9Feb 1, 2025 16:18969,1927,980,381,1547,814,482,000132,889,0002,281,472