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 listOct 13, 2024 02:07zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Oct 5, 2026 20:55Andrew Epstein10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 5, 2026 20:560104,952,73091,411,0003,030,00020,480Exit with code 1: 0 4294967295 50000000 100000000 2004318071 2290649223 77674976 2449177stderr
2Oct 13, 2024 02:0714,266142,719,393105,982,00010,998,0002,367,488
3Oct 13, 2024 02:0714,382144,899,284109,938,0007,995,0002,301,952
4Oct 13, 2024 02:0714,463145,688,639110,625,0007,973,0002,404,352
5Oct 13, 2024 02:0714,496146,624,469110,875,0007,991,0002,281,472
6Oct 13, 2024 02:0714,503146,585,573109,931,0008,994,0002,318,336
7Oct 13, 2024 02:0714,519145,330,356108,053,00011,005,0002,502,656
8Oct 13, 2024 02:0714,559141,901,199114,366,0005,016,0002,392,064
9Oct 13, 2024 02:0714,573145,614,046108,451,00011,045,0002,449,408
10Oct 13, 2024 02:0714,763144,003,679115,055,0006,002,0002,461,696