题目链接:https://leetcode-cn.com/problems/teemo-attacking/
题目如下:
class Solution { public: int findPoisonedDuration(vector& timeSeries, int duration) { int result=0; for(int i=0;i =duration){ result+=duration; }else{ result+=timeSeries[i+1]-timeSeries[i]; } } return result+duration; } };
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)