DP问题,矩形覆盖:状态转移方程f(n) = f(n - 1) + f(n -2)

public class Solution {
    public int rectCover(int target) {
        int fn = 0;
        int[] dp = new int[2];
        if (2 >= target) {
            return target;
        }
        dp[0] = 1;
        dp[1] = 2;
        for(int i = 2; i < target; i++) {
            fn = dp[0] + dp[1];
            dp[0] = dp[1];
            dp[1] = fn;
        }
        return fn;
    }
}