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 12, 2026 15:46highload-churnerhighload-churnerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 12, 2026 15:460297,387,349288,377,00002,113,536expected "2212395564 ", got "mode=33152 off=0 n=100000000 m=2212395564 eq=1 min=33 max=4294967254 asc=499448 ch=53,50,52,57,51,49,40,64,51,43,51,38,51,44,47,51, a=3355931877,3430475733,3657474404, "
2Oct 12, 2026 15:460292,812,355283,885,00002,113,536expected "2256380104 ", got "mode=33152 off=0 n=100000000 m=2256380104 eq=1 min=33 max=4294967283 asc=499785 ch=47,53,57,49,40,45,53,49,48,53,45,60,47,48,50,48, a=413409736,3568236507,592040937, "
3Oct 12, 2026 15:460296,881,000286,912,0001,037,0002,113,536expected "2051435551 ", got "mode=33152 off=0 n=100000000 m=2051435551 eq=1 min=13 max=4294967211 asc=499771 ch=49,51,53,65,64,45,47,60,47,60,41,53,47,25,45,40, a=3328469855,1518002215,4153479976, "