nothing can be as simple as this sol
\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& ts, int d) {\n       int ans=0;\n        for(int i=0;i<ts.size()-1;i++){\n            if(
```\nclass Solution {\npublic:\n    int findPoisonedDuration(vector<int>& ts, int d) {\n       int ans=0;\n        for(int i=0;i<ts.size()-1;i++){\n            if(ts[i]+d-1>=ts[i+1]){\n                ans+=ts[i+1]-ts[i];\n            }\n            else ans+=d;\n        }\n        ans+=d;\n        return ans;\n    }\n};\n```
[]