SUMSTRAIN Getting TLE

Getting TLE in this code. Help.!

import java.io.;
`import java.util.
;

class Sumstrain
{

public static void main(String args[])throws Exception
{
    Sumstrain ob=new Sumstrain();
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    Scanner sn=new Scanner(System.in);
    int t=sn.nextInt();//Integer.parseInt(br.readLine());
    for(int k=0;k<t;k++) {
        int n=sn.nextInt();//Integer.parseInt(br.readLine());
        int a[][]=new int[n][n],m[][]=new int[n][n];
        for(int i=1;i<=n;i++) {
            //String s[]=br.readLine().split(" ");
            for(int j=1;j<=i;j++) {
                a[i-1][j-1]=sn.nextInt();//Integer.parseInt(s[j-1]);
                m[i-1][j-1]=-1;
            }
        }
        int i=0,j=0;
        System.out.println(ob.get(a,m,i,j,n));
    }
}
int get(int a[][],int m[][],int i,int j,int n) {
    if(i+j==2*n-2) return a[i][j];
    if(i==n-1) return a[i][j];
    if(m[i][j]!=-1) return m[i][j];
    else {
        int s1=get(a,m,i+1,j+1,n);
        int s2=get(a,m,i+1,j,n);
        m[i][j]=a[i][j]+((s1>s2)?s1:s2);
    }
    return m[i][j];
}

}

//