题目链接
这题思路很简单
压缩一下状态,转移转态时枚举下一组选那些人。
主要学习一种枚举的技巧
具体见代码
#include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
using namespace std;
typedef long long LL;
const int MAXN=17;
const LL MOD=1000000007;
LL f[1<<MAXN];
LL a[MAXN][MAXN],Ansgroup[1<<MAXN];
void update(vector<int>& now,int n,int group,