#include #include #include #include #include #define ll __int64 using namespace std ; vector vec[44] ; const int mod = 1000000007 ; int dp[1<<21] ; int fa[44] , sz[44] , vis[44] ; int to[44] , id[44] , du[44] ; int c[44][44] ; void init () { c[0][0] = 1 ; for ( int i = 1 ; i < 44 ; i ++ ) { c[i][0] = 1 ; for ( int j = 1 ; j <= i ; j ++ ) c[i][j] = ( c[i-1][j] + c[i-1][j-1] ) % mod ; } } int find ( int a ) { return fa[a] == a ? a : fa[a] = find ( fa[a] ) ; } struct Point { int id , st ; Point () {} Point (int a , int b):id(a),st(b) {} } ; int gao ( int s , int n , int& re) { int tot = 0 ; queue Q ; for ( int i = 1 ; i <= n ; i ++ ) { if ( find (i) == s && du[i] == 0 ) { to[tot++] = 0 ; Q.push ( Point(i,1<