int x=1;
vector<int> v;
vector<vector<int> > ans;
int start,end;
for (int i=0;i<n;i++){
if(A[i]<A[i+1]){
start = i;
end=endpoint(A,n);
i=end;
v.push_back(start);v.push_back(end);
ans.push_back(v);
}
return ans;
int x=1;
vector<int> v;
vector<vector<int> > ans;
int start,end;
for (int i=0;i<n;i++){
if(A[i]<A[i+1]){
start = i;
end=endpoint(A,n);
i=end;
v.push_back(start);v.push_back(end);
ans.push_back(v);
}
return ans;
Comments
Post a Comment