Tiled 2 * n

Threads: http://vn.spoj.com/problems/LATGACH/
Screenshot from 2013-05-23 22:04:19

First we consider the rectangle 2×1 there 1 placing it ranked 1 brick 2×1.
At the rectangular 2×2 there 2 placing it ranked 2 1 member×2 or 2 2 members×1.
At the rectangular 2xi have the following cases with f(in) the placing of the rectangle 2xi.
Screenshot from 2013-05-23 22:06:07

=> f(in) = f(i-1) + f(i-2) with f(1) = 1 and f(2) = 2
=> f(N) as a result of the problem
Regression formula on the formula of the sequence is the famous Fibonacy.
Limitations of this article is N<=100, so f(N) It will be great to use public ways large number Communist-style array of digits.

Some other tiled post:
Tiled 3 * n
And refer: HOLEY SQUARE – Robert Tauraso