#include
using namespace std;
int main() {
long int c1,c2,c3,c4,n,m,arr[1000],brr[1000],i,r=0,s,t,u,d,tt;
cin>>c1>>c2>>c3>>c4;
cin>>n>>m;
for(i=0;i<n;i++)
{
cin>>arr[i];
}
for(i=0;i<m;i++)
{
cin>>brr[i];
}
for(i=0;i<n;i++)
{
d=0;
d=d+c1arr[i];
r+=min(d,c2);
}
s+=min(r,c3);
for(i=0;i<m;i++)
{
d=0;
d+=c1brr[i];
t+=min(d,c2);
}
u+=min(t,c3);
tt=s+u;
cout<<min(tt,c4)<<endl;
}
this code pass the given test case and compiled successfully but not pass the private test cases