{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ccenter\u003e\u003cpre\u003e7\u003cbr\u003e3 8\u003cbr\u003e8 1 0\u003cbr\u003e2 7 4 4\u003cbr\u003e4 5 2 6 5\u003cbr\u003e\u003cbr\u003e(Figure 1)\u003c/pre\u003e\u003c/center\u003eFigure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to the left or diagonally down to the right. \r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Your program is to read from standard input. The first line contains one integer N: the number of rows in the triangle. The following N lines describe the data of the triangle. The number of rows in the triangle is \u0026gt; 1 but \u0026lt;\u003d 100. The numbers in the triangle, all integers, are between 0 and 99. "}},{"title":"Output","value":{"format":"HTML","content":"Your program is to write to standard output. The highest sum is written as an integer."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n7\r\n3 8\r\n8 1 0 \r\n2 7 4 4\r\n4 5 2 6 5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e30\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}