Hi Everyone, I was trying to solve an SOPJ DP problem. I can't think of how to generalize this problem for each value of n. Please someone have a look and let me know how to tackle this problem. link text thanks in advance. asked 30 Mar '18, 01:26

You are not logged in. Please login at www.codechef.com to post your questions!
×CodeChef Discussion 
Hi Everyone, I was trying to solve an SOPJ DP problem. I can't think of how to generalize this problem for each value of n. Please someone have a look and let me know how to tackle this problem. link text thanks in advance. asked 30 Mar '18, 01:26

Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 30 Mar '18, 01:26
question was seen: 225 times
last updated: 30 Mar '18, 22:57
After getting some help and googling it , it seems clear to me that it basically counting number of ways to arrange numbers from 1 to n , with no consecutive numbers adjacent to each other. It can be solved using dp with bit masking http://codeforces.com/blog/entry/16099 . But because of very large value of n , I can't decide how to determine the state of dp .Can anyone plz help me for any further pointers ?