What is wrong wit h the code?

#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+=c1
brr[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

Hello @MANOJ,

Your logic is slightly incorrect.
Cross-verify your code with:

Let me know if you fails to understand your mistake.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.