What is wrong with my code for the problem deepak and journey it is not passing any test case but the logic is correct

#include
using namespace std;
int main() {
int t;
int c[100000],l[100000];
cin>>t;
while(t–){
int n;
cin>>n;

	for(int i=0;i<n;i++)
	{
		cin>>c[i];
	}
	for(int i=0;i<n;i++)
	{
		cin>>l[i];
	}
	long long cost=c[0]*l[0];
	int minc =c[0];
	for(int i=1;i<n;i++){
			minc=min(minc,c[i]);
			cost+=minc*l[i];
	}
	cout<<cost<<endl;

}
return 0;

}

@chinmay_mittal use long long in place of int to avoid overflow .
rest everthing is correct

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.