4819: P1216 [USACO1.5] [IOI1994]数字三角形 Number Triangles(普及-)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:3 Solved:2

Description

Input

Output

Sample Input Copy

5
7
3 8
8 1 0
2 7 4 4
4 5 2 6 5 

Sample Output Copy

30

HINT