| UTPC Contest 10-1-25 Div. 1 (Advanced) |
|---|
| Закончено |
Nick's favorite card is Mega Knight. His favorite part about the Mega Knight is that he can drop it on anyone, anywhere, at anytime.
Obviously, Nick wants to maximize the value of his Mega Knight. The Mega Knight can hit a $$$+$$$-shaped region. That is, if we pick a center square that the Mega Knight is dropped on, the Mega Knight also hits the squares directly North, South, East, and West of it.
Given the Clash Royale map represented by a grid with $$$n$$$ rows and $$$m$$$ columns, calculate the maximum value Nick can get by dropping his Mega Knight.
The first line contains two integers, $$$n$$$ and $$$m$$$ ($$$1 \leq n,m \leq 100$$$).
The next $$$n$$$ lines each contain $$$m$$$ space-separate integers, with each integer $$$v$$$ ($$$1 \le v \le 100$$$) representing the value Nick can obtain from his Mega Knight hitting each grid spot.
Please calculate the maximum value Nick can get from his Mega Knight.
3 3 1 0 0 0 0 1 0 1 1
3
1 4 2 1 2 1
5
In the first sample test, Nick should play the mega knight in the bottom right corner.
In the second sample test, Nick should play the mega knight in the second tile from the left.
| Название |
|---|


