The "A+B/u" rule for discrete and continuous time risk models with dependence