#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n,k; cin>>n>>k; if(n==1){ int a; cin>>a; if(k==1) cout< A(n/2),B(n-n/2); rep(i,n/2) cin>>A[i]; rep(i,n-n/2) cin>>B[i]; map m1,m2; for(int bit=0;bit<(1< C,D; for(auto [x,y]:m2){ C.push_back(x); D.push_back(y); } C.push_back(1e18); D.push_back(0); int c=C.size(); for(int i=c-2;i>=0;i--) D[i]+=D[i+1]; auto f=[&](ll x){ ll cnt=0; for(auto [p,q]:m1){ auto l=lower_bound(ALL(C),x-p)-C.begin(); cnt+=D[l]*q; } if(cnt>=k) return false; return true; }; ll ok=30000000001,ng=-30000000001; while(ok-ng>1){ ll mid=(ok+ng)/2; if(f(mid)) ok=mid; else ng=mid; } cout<