SUMTRIAN  Sums in a Triangle (tutorial)
This is problem SUMITR without strict source limit.
Let us consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second 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 9Warning: large Input/Output data, be careful with certain languages
hide comments
k0gane:
20190530 17:34:56
Last edit: 20190530 17:40:26 

kamran siddique:
20150421 18:46:31
50th AC :)


sri:
20150325 08:10:46
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; what does this mean 

rick:
20140625 21:26:28
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;


reggaeguitar:
20130227 02:21:30
Check out problem number 18 on projecteuler.net, it is the exact same, just one test case 

Vaibhav Jain:
20110801 00:16:53
I am continuously getting an NZEC error with my java program for this problem. I have tested it with other editors and it runs fine. Can anybody please tell me what could be the cause? 

Piotr KÄ…kol:
20100724 17:33:10
The same task without limit:

Added by:  kuszi 
Date:  20041110 
Time limit:  0.314s 
Source limit:  5000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL6 VB.NET 
Resource:  6th International Olympiad In Informatics July 310. 1994. Stockholm  Sweden, Problem 1 