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:56Pavel 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:570124,291,437102,175,0003,005,0002,433,024expected "2243926025 ", got "2278025766 "
2May 1, 2026 17:5712,753116,690,369102,565,0002,011,0002,420,736
3May 1, 2026 17:5712,761120,609,94599,662,0004,983,0002,424,832
4May 1, 2026 17:5712,776122,736,943100,776,0003,991,0002,416,640
5May 1, 2026 17:5712,800127,307,715101,967,0002,999,0002,424,832
6May 1, 2026 17:5712,800122,947,107101,962,0002,998,0002,424,832
7May 1, 2026 17:5712,806124,708,098102,015,0003,000,0002,416,640
8May 1, 2026 17:5712,828125,790,512102,192,0003,005,0002,326,528
9May 1, 2026 17:5712,853122,448,289102,415,0002,982,0002,428,928