ㅁ
ㅁ ㅁ
ㅁ ㅁ ㅁ
ㅁ ㅁ ㅁ ㅁ
ㅁ ㅁ ㅁ ㅁ ㅁ
The solution to the problem can be defined by three rules.
Rule 1) The digit of left side is only affected by the (column).
Rule 2) The digit of right side is only affected by the (column-1).
Rule 3) Other numbers are only affected by the larger value of
(column-1) and (column).
Sort numbers on the left to help understand.
As you can see, it's like a dynamic two-dimensional array.
Add the input data and input it into the array.
If you try the next line,
The Maximum value in the last line is the output of this problem.
<pesudo code>
*Source of the problem = https://www.acmicpc.net/problem/1149
*문제 출처 : BAEKJOON ONLINE JUDGE
댓글
댓글 쓰기