|
||||||||||
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2980 Accepted Submission(s): 1608 Problem Description Yifenfei very like play a number game in the n*n Matrix. A positive integer number is put in each area of the Matrix. Every time yifenfei should to do is that choose a detour which frome the top left point to the bottom right point and than back to the top left point with the maximal values of sum integers that area of Matrix yifenfei choose. But from the top to the bottom can only choose right and down, from the bottom to the top can only choose left and up. And yifenfei can not pass the same area of the Matrix except the start and end. Input The input contains multiple test cases. Each case first line given the integer n (2<n<30) Than n lines,each line include n positive integers.(<100) Output For each test case output the maximal values yifenfei can get. Sample Input
Sample Output
Author yifenfei Source | ||||||||||
|