Is it funny?
\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        int res = 0;\n        for(int i=1; i<timeSeries.size
```\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& timeSeries, int duration) {\n        int res = 0;\n        for(int i=1; i<timeSeries.size(); ++i)\n            res += min(timeSeries[i]-timeSeries[i-1], duration);\n        return 0 == timeSeries.size() ? res : res+duration;\n    }\n};\n```
[]