Help needed getting WA

Question link:CodeChef: Practical coding for everyone

My code

> #include<bits/stdc++.h> 
> using namespace std;
> #define ll long long
> #define llu unsigned long long
> #define f float
> int main()
> {
> 	int t;
> 	cin>>t;
> 	while(t--)
> 	{
> 		int n,m,i,j;
> 		cin>>n>>m;
> 		llu A[n],B[m],C[n+m-1]={0};
> 		for(i=0;i<n;i++)
> 		cin>>A[i];
> 		for(i=0;i<m;i++)
> 		cin>>B[i];
> 		for(i=0;i<n;i++)
> 		{
> 			for(j=0;j<m;j++)
> 			{
> 				C[i+j]+=A[i]*B[j];
> 			}
> 		}
> 		for(i=0;i<n+m-1;i++)
> 		cout<<C[i]<<' ';
> 		cout<<'\n';
> 	}
> 	return 0;
> }

thanks in advance!!

solution link not working

now working

access denied bro

I pasted my code now

The coefficients can be negative but you’ve declared the variables unsigned.

1 Like

Thanks.Got it.