package leetcode;

/**
 * https://leetcode.com/problems/domino-and-tromino-tiling/
 */
public class Problem790 {
    public int numTilings(int N) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem790 prob = new Problem790();
        System.out.println(prob.numTilings(1)); // 1
        System.out.println(prob.numTilings(2)); // 2
        System.out.println(prob.numTilings(3)); // 5
        System.out.println(prob.numTilings(4)); // 11
    }
}

@@ -153,342 +153,300 @@
     
-// TODO%0A        return 0;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem790 prob = new Problem790();%0A        System.out.println(prob.numTilings(1)); // 1%0A        System.out.println(prob.numTilings(2)); // 2%0A        System.out.println(prob.numTilings(3)); // 5%0A        System.out.println(prob.numTilings(4)); // 11
+long%5B%5D a = new long%5B1001%5D;%0A        a%5B1%5D = 1;%0A        a%5B2%5D = 2;%0A        a%5B3%5D = 5;%0A        if (N %3C= 3) %7B%0A            return (int) a%5BN%5D;%0A        %7D%0A        for (int i = 4; i %3C= N; ++i) %7B%0A            a%5Bi%5D = 2 * a%5Bi - 1%5D + a%5Bi - 3%5D;%0A            a%5Bi%5D %25= 1e9 + 7;%0A        %7D%0A        return (int) a%5BN%5D;
 %0A   

Solve problem 790