Why WA on Fibonacci String problem?



Hello Everybody!

I’m solving Fibonacci String problem, and this is my last submission that got WA. Please, tell me why I’m getting this verdict, because I have not yet got what’s the wrong in the submission.

Thanks in advance.


I have found the issue.

I was testing just the sorted permutation of f© values:

f(c1) <= f(c2) <= f(c3) <= … <= f(c|C|).

But, one also have to test this permutation:

f(c2) >= f(c1) <= f(c3) <= … <= f(c|C|), where f(c2) is the second minimum value among them.