|
|
Solution is pretty straightforward based on parity and bit position, but to avoid all those position reflections in your head during coding, generate codes for say N=5 and look at value of "k XOR x" Who many test???????????????????? ??0??1 ?0000? the answer is: 000001 000001 I'm also hung in testcase 53,who can help me?both test data or thought is ok. Any idea? I got Wa in 54,either have you figure out that. Edited by author 13.08.2015 15:09 I found the problem . I do this using DP,dp[i][0] dp[i][j] represent the ways to put '0' and '1' and the answer to too big for long long . So for this problem (only ask for ok or not ok)just set a max range ,when dp[i][j]>max just let dp[i][j]=max. Hope help. |
|
|