Hello , i am looking just for algorithmic or ideas .Please help me I spent more than 3 days on this problem.
1) An overview of what your program does.
My program works only for strictly pair k.
2) The result of your current code.
My current code works for like 1/3 tests that i found out there.
3) What you expected your code to do.
How many strings can consist of N binary digits of the K figures to have value 1?
Since this problem is too simple, he adds the following condition: the figures with the value 1 may be placed only on the positions that are pair, while the numbers with the value 0 can be placed anywhere in the string.
4) The contents of any input files (if appropriate)
n=7 k=2 ;
0 1 0 1 0 0 0
0 1 0 0 0 1 0
0 0 0 1 0 1 0
sol = 2;
Thanks for helping .