this is my code. I have passed all the test cases except for the test case 0, and cant find the bug. Pls help me out
int main() {
int n, c1,c2,c3,c4,rickNo,cabNo;
cin>>n;
int rickRide[1005],cabRide[1005];
int rCost=0,rTotal=0,cCost=0,cTotal=0,minCost=0;
for(int i=1;i<=n;i++){
cin>>c1>>c2>>c3>>c4;
cin>>rickNo>>cabNo;
for(int j=0;j<rickNo;j++){
cin>>rickRide[j];
}
for(int j=0;j<cabNo;j++){
cin>>cabRide[j];
}
//Total cost of rickshaw
for(int j=0;j<rickNo;j++){
rCost += min(c1*rickRide[j],c2);
}
rTotal = min(rCost,c3);
//Total cost of cabs
for(int j=0;j<cabNo;j++){
cCost += min(c1*cabRide[j],c2);
}
cTotal = min(cCost,c3);
minCost = min(rTotal+cTotal,c4);
cout<<minCost<<endl;
}
return 0;
}