I am not able to understand this question.

I am not able to understand this question.Kindly Help me in understanding What do I need to do in this?
Sums in a Triangle Problem Code: SUMTRIAN

Let’s consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest of the sums of numbers that appear on the paths starting from the top towards the base, so that:

on each path the next number is located on the row below, more precisely either directly below or below and one place to the right;

the number of rows is strictly positive, but less than 100

all numbers are positive integers between O and 99.

Input

In the first line integer n - the number of test cases (equal to about 1000). Then n test cases follow. Each test case starts with the number of lines which is followed by their content.

Output

For each test case write the determined value in a separate line.

Example
Input:
2

3

1

2 1

1 2 3

4

1

1 2

4 1 2

2 3 1 1

Output:

5

9

This is a dynamic programming question .If you are a beginner you better leave this question for now and practice easy questions.

For first testcase you can go from 1 to 2 or 1 to 3. If you go from 1 to 2 then either you can further move from 2 to 1 or 2 to 2.The maximum along this path is 5(2+2+1). If you had chosen path 1 from the starting 1 then you can either go to 2 or 3.Here max will be (1+1+3)=5. So max is 5.
For second testcase similarly max path is given by 1->1->4->3 =9.

It means that the input with give you a triangle, where the N’th line will have N numbers.

You can move to a tile just below your current tile, or diagonally-right tile (one down and one right from your current tile).

When ever you are on a tile, that number on it gets added to score. You have to move down in such a fashion, that your score is maximum. (Remember, you can move either one down or one down+one right ONLY from your current tile. You cannot go left or up etc.)