[UVA][cycle] 11036 - Eventually Periodic Sequence
Problem C: Eventually periodic sequence
Given is a function f: 0..N --> 0..N for a non-negative
N and a non-negative integer n ≤ N. One
can construct an infinite sequence F = f 1(n),
f 2(n), ... f k(n) ... , where
f k(n) is defined recursively ...