#ifdef NACHIA #define _GLIBCXX_DEBUG #else // disable assert #define NDEBUG #endif #include #include #include #include using namespace std; using ll = long long; const ll INF = 1ll << 60; #define REP(i,n) for(ll i=0; i using V = vector; template void chmax(A& l, const B& r){ if(l < r) l = r; } template void chmin(A& l, const B& r){ if(r < l) l = r; } #include #include struct Mint { using u64 = unsigned long long; u64 x; #pragma GCC target("pclmul") #pragma GCC target("sse4.1") static u64 mul(u64 a, u64 b){ __m128i ab = _mm_set_epi64x(a, b); __m128i xy = _mm_clmulepi64_si128(ab, ab, 1); return _mm_extract_epi64(xy, 0); } using Self = Mint; Mint(u64 v=0) : x(v) {} Self operator+(const Self& r) const { return Self(x ^ r.x); } Self operator-(const Self& r) const { return Self(x ^ r.x); } Self operator*(const Self& r) const { return Self(mul(x, r.x)); } Self& operator+=(const Self& r){ x ^= r.x; return *this; } Self& operator-=(const Self& r){ x ^= r.x; return *this; } Self& operator*=(const Self& r){ x = mul(x, r.x); return *this; } Self operator-() const { return Self(x); } }; V> expand(int N, V& a){ V> A(N+1, V(1< contract(int N, V>& A){ for(auto& h : A) REP(d,N) REP(i,1< a(1<> c; x |= (unsigned long long)(c - '0') << i; } return Mint(x); } void testcase(){ int N; cin >> N; V A(1< B(1< C(1<> AA = expand(N, A), BB = expand(N, B); V> CC(N*2+1, V(1<> d & 1)); } cout << "\n"; } } int main(){ cin.tie(0)->sync_with_stdio(0); testcase(); return 0; }