递归推导:
all(n) = left(n) + right(n) + up(n)
= left(n-1) + up(n-1) + right(n-1) + up(n-1) + up(n)
= all(n-1) + up(n-1) + up(n)
= all(n-1) + all(n-2) + all(n-1)
= 2*all(n-1) + all(n-2)
递归推导:
all(n) = left(n) + right(n) + up(n)