problem code:- FFC219B
contest code:-FFC22019
#include
using namespace std;
#include<stdio.h>
int main()
{
long int T,L[100000],M[100000],tot[100000][100000],sum[100000],i,a1,a2,a3,a4,j;
cin>>T;
for(i=1;i<=T;++i)
{
a1=1;
a2=2;
a3=3;
a4=4;
cin>>L[i]>>M[i];
for(j=1;j<=M[i];++j)
{
tot[i][j]=a1*a2*a3*a4;
a1++;
a2++;
a3++;
a4++;
}
sum[i]=0;
for(j=L[i];j<=M[i];++j)
{
sum[i]+=tot[i][j];
}
}
for(i=1;i<=T;++i)
{
cout<<sum[i]<<"\n";
}
return 0;
}
ssjgz
2
I get “403 - Access Denied”.
here is code
1 min for submission
ssjgz
5
Wait - is this from a current contest?
yep it “was” i was unable to remove SIGSEV error . my code is fine and producing desired result but still it was not accepted
Have you taken the modulo?
Also do not use any 2D array
what I have done is all in the above code . it is doing great in dev c++ but was not accepted due to SIGSEGV run time error
Even codechef guys do not recommend dev c++,it is kinda outdated.
checked on online compiler too .i am kind of beginner so i dont know about vectors and templates . i have learnt to statically initialisation of array