Dynamic programming

I am realy having hard time in getting how have we constructd the DP array in this questn(see Soln.)

http://www.codechef.com/CDWV2012/problems/BERRY

if any1 cud help…

1 Like

Get the n from user and construct dynamic array using malloc

1 Like

thanks hariprasath,what a great bit of answer dat this…

public class DynamicArray {
public static int x[];
public static void main(String args[])throws Exception
{
int n=5,i=0;
x=new int[5];

}

}

//