#include<bits/stdc++.h>
#define int long long
using namespace std;
unsigned int n,s,l,h[200005],a[200005];
bool check(unsigned int x){
unsigned int ret=0;
for(unsigned int i=1;i<=n;i++){
unsigned int t=h[i]+a[i]*x;
if(t>l){
ret+=t;
}
if(ret>=s){
return 1;
}
}
return 0;
}
int f(unsigned int l,unsigned int r){
if(l>=r){
return l;
}
unsigned int mid=(l+r)/2;
if(check(mid)==1){
f(l,mid);
}else{
f(mid+1,r);
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>s>>l;
for(unsigned int i=1;i<=n;i++){
cin>>h[i];
}
for(unsigned int i=1;i<=n;i++){
cin>>a[i];
}
cout<<f(0,max(s,l));
return 0;
}
难看的评测记录