Discussion About Deepak and his journey

This is Discussion thread about Deepak and his journey

#include < iostream >
using namespace std;
int main() {
int N,C[100],L[100],T,i,j,sum,min;
cin>>T;

for(i=1;i<=T;i++)
{	
  cin>>N;

  for(j=0;j<N;j++)
   cin>>C[j];

  for(j=0;j<N;j++)
   cin>>L[j];

  sum=C[0]*L[0];
  min=C[0]; 

  for(j=1;j<=N;j++)
  {  
    if(C[j]<min)
	  min=C[j];
	  sum+=min*L[j];
  } 
   cout<<sum<<endl;
}
return 0;

}

What is the error in this code for this problem DEEPAK AND HIS JOURNEY?It is not getting submitted,showing wrong answer