上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 高质量博客 网络最大流 #include<bits/stdc++.h> using namespace std; #define N 1205 #define M 120005 #define int long long const int inf=1e18; int n,m,s,t,head,ta 阅读全文
posted @ 2022-08-12 19:12 hubingshan 阅读(15) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; #define N 2000005 int n,m,x,y,xx,yy,dfn[N],low[N],zhan[N],tot,top,h[N],col[N],u[N],k,cnt; struct AB{ int 阅读全文
posted @ 2022-08-11 20:02 hubingshan 阅读(10) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; #define N 5005 int n,m,x,y,z,dis[N],u[N],k,h[N]; struct AB{ int a,b,c,n; }d[N*2]; void cun(int x,int y,in 阅读全文
posted @ 2022-08-11 14:28 hubingshan 阅读(13) 评论(0) 推荐(0)
摘要: tarjan void tarjan(int x){ dfn[x]=low[x]=++tot,zhan[++t]=x,u[x]=1; for(int i=h[x];i;i=d[i].n){ int y=d[i].b; if(!dfn[y]){ tarjan(y); low[x]=min(low[x] 阅读全文
posted @ 2022-08-11 11:13 hubingshan 阅读(11) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; #define N 1000005 int n,j,b[N],rk[N],tmp[N],sa[N],s[N],maxn,h[N]; char a[N]; void pai(){ memset(s,0,sizeo 阅读全文
posted @ 2022-08-08 17:14 hubingshan 阅读(21) 评论(0) 推荐(0)
摘要: 由于之前写的太垃圾,所以有了这篇 一、基础博弈 1.基本定理 先手必胜当且仅当先手可以把当前状态转移到先手必败态 先手必败当且仅当先手不能将当前状态转移至先手必败态 2.如何证明博弈推论成立 确定必败和必胜态 最终态是必败态 必胜态可以走到必败态 必败态只能走到必胜态 3.SG函数 以有向无环图博弈 阅读全文
posted @ 2022-08-02 19:51 hubingshan 阅读(73) 评论(0) 推荐(0)
摘要: 负一、学习链接 莫反基础 素数 零、前置知识 二项式定理:\(\sum\limits_{i=0}^nC_k^i\times a^i\times b^{n-i}=(a+b)^k\) 常见用法:\(\sum\limits_{i=0}^nC_k^i\times -1^i=(1+(-1))^k\) 约数函数 阅读全文
posted @ 2022-07-30 14:42 hubingshan 阅读(18) 评论(0) 推荐(0)
摘要: 零、链接 行列式 随机游走概率 鞅定义 鞅与停时 一 、概率&期望 1、期望定义: 每次可能结果的概率乘以其结果的总和 2、期望性质(C是常数) \(E(C)=C\) $ E(x+y)=E(x)+E(y) $ (不要求独立) $ E(xy)=E(x)* E(y)$ (要求独立) \(E(Cx)=C* 阅读全文
posted @ 2022-07-29 20:13 hubingshan 阅读(37) 评论(0) 推荐(0)
摘要: 题目传送门 题意: 给定一个数字 $N$ 和一个字符串 $S$ ,问满足如下条件的字符串有几个 长度为$N$ 该字符串为回文串 该字符串的字典序 $\le$ $S$的字典序 多组测试数据,$N$的总和 $\le$ $10^6$ 思路: 看完题,em...要用数学方法,我不会懒得想,其实这不就是数位D 阅读全文
posted @ 2022-03-12 14:05 hubingshan 阅读(21) 评论(0) 推荐(0)
摘要: struct TREE{ int val[N*4],tag[N*4]; void pushdown(int o,int l,int r){ int x=tag[o]; if(x){ int mid=(l+r)/2; val[o*2]+=(mid-l+1)*x; val[o*2+1]+=(r-mid) 阅读全文
posted @ 2022-01-19 14:45 hubingshan 阅读(20) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页