whts wrong with dis code??? y m i gettng error NZSCE?

import java.io.*;

class goldentree
{
public static void main(String ar[])
{
try{
BufferedReader d=new BufferedReader(new InputStreamReader(System.in));
int iteration=Integer.parseInt(d.readLine());
int[] f,s1,s2,k,n;
long[][] tax;
f=new int[iteration];
s1=new int[iteration];
s2=new int[iteration];
k=new int[iteration];
n=new int[iteration];
tax=new long[iteration][];

for(int i=0;i<iteration;i++)
{
	String s[]=(d.readLine()).split(" ");
	f[i]=Integer.parseInt(s[0]);
	s1[i]=Integer.parseInt(s[1]);
	s2[i]=Integer.parseInt(s[2]);
	k[i]=Integer.parseInt(s[3]);
	n[i]=Integer.parseInt(s[4]);
}
int x=0,j=0;
for(int i=0;i<iteration;i++)
{
	tax[i]=new long[n[i]];
	tax[i][0]=f[i];
	x=(s1[i]+s2[i]);
	for(j=1;j<n[i];j++)
	{
		if(j<=s1[i])
			tax[i][j]=tax[i][j-1]+1;
		

		else if(j<=x)
			tax[i][j]=(tax[i][j-1]*2)%100000007;	

		else

tax[i][j]=((((((tax[i][j-1]*tax[i][j-2])%100000007)*tax[i][j-3])%100000007)*tax[i][j-4])%

100000007);

	}
System.out.println(tax[i][n[i]-1]);
}

}
catch(Exception e)
{}

}

}

oops
my error is NZEC

there is error in your code in this line

tax[i][j]=((((((tax[i][j-1]tax[i][j-2])%100000007)tax[i][j-3])%100000007)*tax[i][j-4])%100000007);
1 Like

http://www.codechef.com/problems/GROWGOLD