力扣滚动数组

public class Solution {
    public int rectCover(int target) {
        if (target == 0) {
            return 0;
        }

        int p = 0, q = 1, r = 1;

        for (int i = 1; i < target; i++) {
            p = q;
            q = r;
            r = p + q;
        }

        return r;
    }
}