摘要: #include using namespace std; #define LL long long const int maxn=sqrt(2e9)+10; int p[maxn]; void getprime() { for(int i=2;i getfactor(LL x) { vectorq; for(int i=1,t;i*imp[maxm]; int lin... 阅读全文
posted @ 2018-10-13 12:46 BIack_Cat 阅读(222) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; struct DLX { const static int maxn=750,maxm=350,maxnode=maxn*maxm; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode]... 阅读全文
posted @ 2018-10-11 05:26 BIack_Cat 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; #define LL long long const int maxn=2e5+10; struct BIT //binary index tree { int t[maxn],n; int a[maxn]; #define lowbit(x) (x&(-x)) void init(int n_) ... 阅读全文
posted @ 2018-10-11 04:26 BIack_Cat 阅读(377) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]... 阅读全文
posted @ 2018-10-09 03:25 BIack_Cat 阅读(257) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]... 阅读全文
posted @ 2018-10-09 02:50 BIack_Cat 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]... 阅读全文
posted @ 2018-10-09 02:29 BIack_Cat 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int maxn=110; const int maxm=maxn*maxn; struct DLX { const static int maxn=1001,maxm=1001,maxnode=100010; int n,m,sz,anssz; int u[maxnode],d[maxnode],... 阅读全文
posted @ 2018-10-09 01:03 BIack_Cat 阅读(288) 评论(0) 推荐(0) 编辑
摘要: #include #define LL long long using namespace std; const int maxn=1e3+10; int a[maxn][maxn]; int m4[4][4]={ 1,2,3,4, 4,3,2,1, 2,1,4,3, 3,4,1,2 }; void meow(int n) { if(n==4) ... 阅读全文
posted @ 2018-10-01 21:30 BIack_Cat 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define LL long long using namespace std; const int maxn=1e3+10; #define in(x) scanf("%lld",&x) #define inf 9223372036854775807LL LL ex_gcd(LL a,LL b,LL&x,LL &... 阅读全文
posted @ 2018-10-01 19:45 BIack_Cat 阅读(154) 评论(0) 推荐(0) 编辑
摘要: #include int a[1000010],q[1000010],L[1000010],top,n,m,Q; int main(){ scanf("%d%d%d",&n,&m,&Q); for(int i=1;i<=n;i++)scanf("%d",a+i); for(int i=1;i<=n;i++){ if(!top)q[++top]=i; ... 阅读全文
posted @ 2018-10-01 19:38 BIack_Cat 阅读(117) 评论(0) 推荐(0) 编辑