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 listMay 1, 2026 17:50Pavel SkripkinPavel SkripkinError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 17:510118,592,811101,255,0004,010,0002,420,736expected "2116576161 ", got "2160768194 "
2May 1, 2026 17:5112,727123,561,924102,336,0002,026,0002,416,640
3May 1, 2026 17:5112,730120,207,168102,384,0002,007,0002,437,120
4May 1, 2026 17:5112,766122,930,180102,670,0002,013,0002,326,528
5May 1, 2026 17:5112,783120,901,497101,827,0002,994,0002,326,528
6May 1, 2026 17:5112,789120,760,368101,878,0002,996,0002,424,832
7May 1, 2026 17:5112,789119,041,824101,878,0002,996,0002,424,832
8May 1, 2026 17:5112,821117,949,624100,128,0005,006,0002,424,832
9May 1, 2026 17:5112,840122,861,445102,282,0003,008,0002,420,736