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 listAug 29, 2026 12:44Victor MerckléVictor MerckléError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 29, 2026 12:45030,823,86721,452,0001,026,0002,117,632expected "2153480813 ", got "2159748768 "stderr
2Aug 29, 2026 12:455,40552,468,55043,263,0001,064,0002,117,632stderr
3Aug 29, 2026 12:455,43052,903,68843,416,0001,117,0002,117,632stderr
4Aug 29, 2026 12:455,43653,050,04943,450,0001,130,0002,117,632stderr
5Aug 29, 2026 12:455,44154,313,07643,360,0001,260,0002,117,632stderr
6Aug 29, 2026 12:455,44252,794,61043,416,0001,210,0002,117,632stderr
7Aug 29, 2026 12:455,44952,888,57143,492,0001,197,0002,117,632stderr
8Aug 29, 2026 12:455,57554,685,91144,682,0001,035,0002,117,632stderr
9Aug 29, 2026 12:455,64154,389,31145,237,0001,020,0002,117,632stderr