神奇01串
本来想搜索+部分打表 后来想了想还是放弃吧
#include<bits/stdc++.h> #define LL long long using namespace std; const int N = 1000005; int n, a[N]; int main(){ scanf("%d", &n); if (n == 2){ puts("Impossible"); return 0; } for (int i = 1; i < n; ++i){ a[(LL)i * i % n] = 1; } for (int i = 1; i < n; ++i) { printf("%d", 1 - a[i]); } }