#include #include #include using namespace std; int action(int x,vector a,int N){ int y=0; for (int i=0; i<2*N; i++){ if (x&(1<> T; for (int tt=1; tt<=T; tt++){ cin >> N >> C; atcoder::dsu U(1<<(2*N)); vector> t(N, vector(2*N,0)),u(N, vector(2*N,0)); // 2π/N 回転 for (int i=0; i> G=U.groups(); cout << G.size() << endl; } }