#include<iostream> #include<vector> using namespace std; long long res = 0; void dfs(int n, bool * a, int pos, int deep, vector<bool> visit) { if (deep == n) { res = (res + 1) % (1000000007); return; } visit[pos] = 1; for (int i = 0; i < n; i++) { if (visit[i] == 1...