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:07zielajzielajScore: 14,503Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 13, 2024 02:0714,266142,719,393105,982,00010,998,0002,367,488
2Oct 13, 2024 02:0714,382144,899,284109,938,0007,995,0002,301,952
3Oct 13, 2024 02:0714,463145,688,639110,625,0007,973,0002,404,352
4Oct 13, 2024 02:0714,496146,624,469110,875,0007,991,0002,281,472
5Oct 13, 2024 02:0714,503146,585,573109,931,0008,994,0002,318,336
6Oct 13, 2024 02:0714,519145,330,356108,053,00011,005,0002,502,656
7Oct 13, 2024 02:0714,559141,901,199114,366,0005,016,0002,392,064
8Oct 13, 2024 02:0714,573145,614,046108,451,00011,045,0002,449,408
9Oct 13, 2024 02:0714,763144,003,679115,055,0006,002,0002,461,696