Double Queue for Sum and Subs