totalPoisonedTime
to 0.timeSeries
array.
a. For each attack time t
, calculate the next attack time or the end of the array.
b. If the next attack time is within the current poison duration, add the difference between the next attack time and the current attack time to totalPoisonedTime
.
c. Otherwise, add the full duration
to totalPoisonedTime
.duration
for the last attack to totalPoisonedTime
.totalPoisonedTime
.