#include #include using namespace std; using i64 = int64_t; int main(void) { constexpr int N = 16; vector p2(10); p2[0] = 1; for(int i=0; i<9; ++i) { p2[i+1] = p2[i] * 2; } vector> G(N, vector(N, false)); for(int j=0; j> dp(N, vector(1<> u & 1)) { continue; } for(int v=0; v> v & 1)) { continue; } if(G[u][v]) { dp[u][S0] += dp[u][T0] * dp[v][T1]; } } } } } } for(int v=0; v