classSolution{
public:intvideoStitching(vector<vector<int>>& clips,int T){
int res =1;int slow =0;int fast =0;
vector<bool>visited(clips.size(),false);sort(clips.begin(),clips.end())
1024.视频拼接贪心算法动态规划贪心算法暴力遍历每一个起点,每次找区间能到达的最远点,下一次的起始点小于等于这次的终点,下一次的终点继续尽可能远,当下一次的终点大于等于T时退出循环,如果最后终点也没有大于等于T,则返回-1.class Solution {public: int videoStitching(vector<vector<int>>& clips, int T) { int res = 1; int slow =