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 2, 2026 23:46Karthik ReddyKarthik ReddyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 2, 2026 23:47042,715,68832,607,0001,092,0002,117,632expected "2146847832 ", got "W12207 bw3281 runs96 len 1/2/123/403 gap 1/4/245 992400990000000049009990000010999999930990000000990000000990099999990000990000000000999990009999100000999999199990099000 "
2Oct 2, 2026 23:47043,139,20632,857,0001,125,0002,117,632expected "2170182520 ", got "W12207 bw5037 runs91 len 1/5/126/366 gap 1/2/244 000099990999199000099900990990009900990000000999999099999990999900099999990990099990099000990999990099990000999999999900 "
3Oct 2, 2026 23:47038,914,32528,675,0001,109,0002,117,632expected "2171653840 ", got "W12207 bw4281 runs74 len 1/2/245/611 gap 1/4/243 121000099099999990999999999999199999109900999999000000990000009900999900000000009990000000000000029900000999990099199999 "