Accepted
/in/foo.cc: In function 'int main()':
/in/foo.cc:26:52: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp[i ^ (1 << p)][j & (~(1 << to)) ^ (1 << p)] += dp[i][j];
~~^~~~~~~~~~~~~~