{"trustable":true,"sections":[{"title":"Description","value":{"format":"MD","content":"Observe the number pyramid below.\n\n\nWrite a program to find the path from the top to any point at the bottom that maximizes the sum of the numbers along the path. At each step, you can move to the point directly below or to the right of the current point.\n\n![](CDN_BASE_URL/a1379badc4b471eb2465a562cf6eb828?v\u003d1719280338)\n\nIn the example above, the path from $7 \\to 3 \\to 8 \\to 7 \\to 5$ generates the maximum weight."}},{"title":"Input","value":{"format":"MD","content":"The first line contains a positive integer $r$ , indicating the number of rows.\n\nThe following lines each contain integers specific to the corresponding row of the number pyramid."}},{"title":"Output","value":{"format":"MD","content":"A single line containing the maximum possible sum that can be obtained."}},{"title":"Sample 1","value":{"format":"MD","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\n7\n3 8\n8 1 0\n2 7 4 4\n4 5 2 6 5 \n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e30\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Hint","value":{"format":"MD","content":"【Data Constraints】 \nFor $100\\%$ data, $1\\le r \\le 1000$, all inputs are within the range of $[0,100]$.\n\nProblem translated from NOCOW.\n\nUSACO Training Section 1.5\n\nIOI1994 Day1T1"}}]}