#include using namespace std; bool ok(vector&arr,int m,int x){ int cnt=1; int i=0; int n=arr.size(); while(cnt=next){ ans=mid2; high2=mid2-1; }else{ low2=mid2+1; } } if(ans==-1)return false; i=ans; cnt++; } if(cnt==m)return true; else return false; } int findMaximum(vectorarr,int m){ int n=arr.size(); int low=0; int high=1e9; int ans=-1; while(low<=high){ int mid=(low+high)/2; if(ok(arr,m,mid)){ ans=mid; low=mid+1; }else{ high=mid-1; } } return ans; } int main() { int n; cin>>n; vectorv(n); cin>>v; int m; cin>>m; cout<