摘要: 1 void pre() 2 { 3 ine[1]=1; 4 for(int i=2;i<P;i++) 5 { 6 int a=P/i,b=P%i; 7 ine[i]=(ine[b]*(-a)%P+P)%P; 8 } 9 } 阅读全文
posted @ 2019-08-18 20:43 小布鞋 阅读(122) 评论(0) 推荐(0) 编辑
摘要: inline int read() { int x=0;char ch=getchar(); while(ch<'0'||ch>'9')ch=getchar(); while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x; } 阅读全文
posted @ 2019-08-18 20:43 小布鞋 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1 // Cease to struggle and you cease to live 2 // p4178 3 #include <iostream> 4 #include <cmath> 5 #include <cstdio> 6 #include <cstring> 7 #include < 阅读全文
posted @ 2019-08-18 20:42 小布鞋 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=2e5+8; 4 int modd,n,m,rt,cnt=0,cnto=0; 5 int son[N],id[N],top[N],f[N],dep[N],siz[N],h[N 阅读全文
posted @ 2019-08-18 20:41 小布鞋 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=4e4+8; 5 int n,all,mx,root,cntd=0,cnt=0; 6 ll ans=0,k; 7 int h[ 阅读全文
posted @ 2019-08-18 20:41 小布鞋 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 //https://blog.csdn.net/jarjingx/article/details/8521690 2 //上面是讲解,下面是代码 3 //https://www.e-learn.cn/content/qita/1061337 4 //poj3648 5 //女2n男2n+1 6 #include<iostream> 7 #include<cstdio> 8 #include<c 阅读全文
posted @ 2019-08-18 20:40 小布鞋 阅读(146) 评论(0) 推荐(0) 编辑