hello

这是一段测试

是否可以成功呢

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<vector>

#include<algorithm>

using namespace std;

/*

* @lc app=leetcode.cn id=435 lang=cpp
*
* [435] 无重叠区间
*/

// @lc code=start
class Solution {
public:
int eraseOverlapIntervals(vector<vector<int>>& intervals) {
if(intervals.empty()){
return 0;
}
sort(intervals.begin(), intervals.end(),
{ return a[1] < b[1]; });
int res = 0, prev = intervals0;
for (int i = 1; i < intervals.size();i++){
if(intervalsi<prev){
res++;
}else{
prev = intervalsi;
}
}
return res;
}
};
// @lc code=end


~2024/3/15/17+31~