public void Run() { { var line = Input.ReadIntArray(); N = line[0]; M = line[1]; } C = new bool[N, N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { C[i, j] = i == j; } } for (int i = 0; i < M; i++) { var line = Input.ReadIntArray(); int x = line[0] - 1; int y = line[1] - 1; C[x, y] = true; C[y, x] = true; } ret = 0; var bf = new BruteForceBit(N, Process); bf.DFSRun(); Console.WriteLine(ret); }
public void Run() { N = Input.ReadInt(); V = new int[N]; for (int i = 0; i < N; i++) { V[i] = Input.ReadInt(); } var bf = new BruteForceBit(N, Process); bf.DFSRun(); Console.WriteLine(ret); }
public void Run() { N = Input.ReadInt(); // ????? dict = new Dictionary <int, int>(); for (int i = 1; i <= N; i++) { int x = i; int p = 2; while (x > 1) { if (x % p == 0) { if (!dict.ContainsKey(p)) { dict.Add(p, 0); } dict[p]++; x /= p; } else { p++; } } } // 75??????????? countComb = new List <List <int> >(); DFS(75, 2, new List <int>()); long ret = 0; for (int i = 0; i < countComb.Count; i++) { var bf = new BruteForceBit(() => ret++, countComb[i], dict); bf.DFSRun(); } Console.WriteLine(ret); }