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 listApr 25, 2026 06:31limanjun99limanjun99Error
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 25, 2026 06:31059,380,03038,823,0004,977,0002,555,904expected "2153412234 ", got "2153412234median:7172988,sampling:131127104,tight_bound:9112176,loose_bound:858448,"
2Apr 25, 2026 06:31061,087,95942,471,0001,011,0002,297,856expected "2116924450 ", got "2116924450median:6252196,sampling:131199156,tight_bound:8910852,loose_bound:860996,"
3Apr 25, 2026 06:31064,740,05439,413,0004,042,0002,523,136expected "2212138227 ", got "2212138227median:6838764,sampling:130872872,tight_bound:8558772,loose_bound:852308,"