|
|
back to boardmy idea You can search some small test data, then the solution is here: For f[n], there're three ways to construct it. Put 2 onto 2nd position, then it's f[n-1]; Put 3 onto 2nd position, put 2 onto 3rd position. This is f[n-3]! (You must put 4 onto 4th position) The last condition contains only one possible way like that (first odd, then even) 13578642 So f[n]=f[n-1]+f[n-3]+1. Re: my idea Good Job!You're quite clever! Re: my idea Pal, you must have pains in eggs..... Re: my idea Posted by hliu20 21 May 2013 12:58 Really nice! How you get that, really smart! |
|
|