L-Board
시간 제한2초메모리 제한1024 MB
n x m 정수 판에서 한 모서리를 공유하는 두 선분으로 이루어진 L 모양을 골라 덮는 칸의 합을 최대로 만든다.
문제
Lord Pooty has a by board of integers and would like to draw an L. However, he would like to maximise the sum of integers on the tiles covered by L. The L can be rotated in all 4 possible orientations such that the sides are parallel to the board. Each side of the L may not necessarily be drawn (a straight line is possible). Some examples of valid Ls are shown below:

Formally, you want to choose points, , and (which may not necessarily be distinct) on the board such that
is maximised.
입력
Your program must read from standard input.
The input starts with a line with two integers and where and are height and width of the board. This is followed by lines of integers, representing the board.
출력
Your program must print to standard output.
The output should contain a single integer on a single line, the maximum possible.
제한
- for and