How is an array of length 4 good? As an array of length (f[i] + f[2] + … + f[n]) is good only if integer i is exactly present f[i] times (for 1 <= i <= n) in the array, which makes the length of the array to be n * (n + 1) / 2. And 4 can never be n * (n + 1) / 2 for any integer value of n?
Starters 216: LIS and LDS