title

随笔分类 -  模板

摘要:给出非负整数a,b;求的满足a x+b y=1的最小非负整数x和整数y,若没有则输出sorry。 include include include define rg register define int long long using namespace std; inline int read( 阅读全文
posted @ 2018-10-05 21:46 Horrigue_JyowYang 阅读(139) 评论(0) 推荐(0)
摘要:感受一下两种不同的码风 第一种是我的正常码风 include include include include include using namespace std; const int N =41000010; char s[N],news[N include include include in 阅读全文
posted @ 2018-09-10 01:44 Horrigue_JyowYang 阅读(116) 评论(0) 推荐(0)
摘要:``` include include include include using namespace std; const int LEN =110; const int N =100010; char s[LEN]; int end[N];//表示当前节点是否为结束节点 int trie[N][ 阅读全文
posted @ 2018-09-10 01:39 Horrigue_JyowYang 阅读(94) 评论(0) 推荐(0)
摘要:这里用到了倍增的思想 include include include include using namespace std; int n,m; int dp[100001][20]; int read(){ int f=1,x=0;char s=getchar(); while(s'9'){if( 阅读全文
posted @ 2018-09-10 01:38 Horrigue_JyowYang 阅读(117) 评论(0) 推荐(0)
摘要:``` include include include include using namespace std; const int N =1000010; int lens,lenss,nxt[N]; char s[N],ss[N];//s文本串(长串) ss模式串(短串) inline void 阅读全文
posted @ 2018-09-10 01:37 Horrigue_JyowYang 阅读(104) 评论(0) 推荐(0)
摘要:``` include define int long long using namespace std; const int N =3000010; int n,p,inv[N]; signed main(){ scanf("%d%d",&n,&p); inv[1]=1;printf("1\n") 阅读全文
posted @ 2018-09-10 01:36 Horrigue_JyowYang 阅读(105) 评论(0) 推荐(0)
摘要:懒标记+乘法 include include include include define int long long using namespace std; int n,m; int ans,p,num[3000100]; struct Node{ int l,r,num; int sum,la 阅读全文
posted @ 2018-09-10 01:34 Horrigue_JyowYang 阅读(144) 评论(0) 推荐(0)
摘要:``` include include define rg register using namespace std; const int N = 1e7 + 1; int n, m, v[N], prime[N], tot; bool is_prime[N]; inline int read(){ 阅读全文
posted @ 2018-09-10 01:30 Horrigue_JyowYang 阅读(88) 评论(0) 推荐(0)
摘要:NOIP毒瘤 include include include include using namespace std; int qa[5100],qb[5100],ans[5100],book,n; string a,b; inline bool jud(int a){ if(a 9) return 阅读全文
posted @ 2018-09-10 01:29 Horrigue_JyowYang 阅读(110) 评论(0) 推荐(0)
摘要:1、区间查单点加 include include using namespace std; const int N =500010; int n,m,a[N],c[N]; inline int read(){ int f=0,x=0; char ch=getchar(); while(!isdigi 阅读全文
posted @ 2018-09-10 01:29 Horrigue_JyowYang 阅读(82) 评论(0) 推荐(0)
摘要:``` include include define rg register using namespace std; define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1 阅读全文
posted @ 2018-09-10 01:27 Horrigue_JyowYang 阅读(106) 评论(0) 推荐(0)
摘要:``` include include include include include define int long long using namespace std; const int N =2e9+1; const int mod =1e9+7; int T,n; struct mat{ i 阅读全文
posted @ 2018-09-10 01:27 Horrigue_JyowYang 阅读(161) 评论(0) 推荐(0)
摘要:``` include include include include include define int long long using namespace std; const int N =2e9+1; const int mod =1e9+7; int T,n; struct mat{ i 阅读全文
posted @ 2018-09-10 01:26 Horrigue_JyowYang 阅读(76) 评论(0) 推荐(0)
摘要:``` include include define int long long using namespace std; const int N =1e5+10; int t,n,m,p; int a[N],b[N];//两个非负整数 inline int read(){ int f=0,x=0; 阅读全文
posted @ 2018-09-10 01:25 Horrigue_JyowYang 阅读(102) 评论(0) 推荐(0)
摘要:``` #include #define int long long int a,b,p; inline double power(int a,int b){ int ans=1; for(;b;b>>=1){ if(b&1) ans=ans*a; a=a*a; } return ans; } signed main(){ scanf("%lf%lf",&a,&b); prin... 阅读全文
posted @ 2018-09-10 01:25 Horrigue_JyowYang 阅读(82) 评论(0) 推荐(0)
摘要:1、树状数组+离散化(nlogn) include include include include include define int long long using namespace std; const int N = 40010; struct node { int v,order; }; 阅读全文
posted @ 2018-09-10 01:13 Horrigue_JyowYang 阅读(83) 评论(0) 推荐(0)
摘要:跑两遍dfs include include include include include include using namespace std; const int N =100010; const int inf =1e9+7; struct edge{ int to,nxt,w; }e[N 阅读全文
posted @ 2018-09-10 01:08 Horrigue_JyowYang 阅读(114) 评论(0) 推荐(0)
摘要:``` #include #include #include using namespace std; void beford(string in,string after){ if(in.size()){ char ch=after[after.size()-1]; cout>inord>>aftord; beford(inord,aftord); return 0; } ``` 阅读全文
posted @ 2018-09-10 01:07 Horrigue_JyowYang 阅读(82) 评论(0) 推荐(0)
摘要:``` include include include include include include define rg register using namespace std; inline int read(){ rg int f=0,x=0; rg char ch=getchar(); w 阅读全文
posted @ 2018-09-10 01:06 Horrigue_JyowYang 阅读(101) 评论(0) 推荐(0)
摘要:``` include include include include include include using namespace std; const int N = 110,M = 110; struct edge{ int to,nxt; }e[M]; //边的集合 int vis[N]; 阅读全文
posted @ 2018-09-10 01:05 Horrigue_JyowYang 阅读(85) 评论(0) 推荐(0)