• [C] Lottery Draw

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Now, there is a new play about lottery draw.
    Give you a matrix with N * N integers, you can choose a A * B(0 <= A, B <= N) rectangle to box a part of the matrix, if the higher the sum of these integers in the rectangle are, the more you might win a prize in a lottery.
    So, can you find the maximum sum in the matrix? You can also give up this time for getting 0.

  • 输入
  • Input until EOF.
    Each test contains a integet N (4 <= N <= 100) and a N * N matrix, each integer will be in [-99, 99].
  • 输出
  • Print the maximum sum.
  • 样例输入
  • 4
    1 1 1 1
    2 2 2 2
    3 3 3 3
    4 4 4 4
    
  • 样例输出
  • 40
    
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜