
模板
文章平均质量分 85
Ghostkkkk
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
模板_Dinic算法
const int inf = 0x3f3f3f3f; const int MX = 105; const int MXE = 4 * MX * MX; struct MaxFlow { struct Edge { int v, w, nxt; } edge[MXE]; int tot, num, s, t; int head[MX]; vo原创 2017-08-16 14:34:13 · 242 阅读 · 0 评论 -
模板_zkw费用流
namespace MCMF { int S, T;//源点,汇点 int tot, n; int st, en, maxflow, mincost; bool vis[MX]; int head[MX], cur[MX], dis[MX]; int roade[MX], roadv[MX], rsz; //用于打印路径 const int原创 2017-08-16 14:41:28 · 268 阅读 · 0 评论 -
模板_扩展kmp
int nxt[MAXN],extend[MAXN]; char S[MAXN],T[MAXN]; void GetNext(char *T) { int a=0; int Tlen=strlen(T); next[0]=Tlen; while(a next[1]=a; a=1;原创 2017-08-21 08:09:53 · 235 阅读 · 0 评论 -
模板_AC自动机
const int SIGMA_SIZE = 130; const int MAXNODE = 1000*55; const int MAXS = 150 + 10; struct ACautomata { int ch[MAXNODE][SIGMA_SIZE]; int f[MAXNODE]; // fail函数 int val[MAXNODE]; // 每个原创 2017-09-09 13:05:39 · 170 阅读 · 0 评论 -
模板_后缀数组
int cntA[MAXN],cntB[MAXN],sa[MAXN],tsa[MAXN],Rank[MAXN],A[MAXN],B[MAXN],height[MAXN]; void build_sa(char* ch,int n) { for (int i = 0; i < 256; i ++) cntA[i] = 0; for (int i = 1; i <= n; i ++)原创 2017-08-16 14:42:53 · 210 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第八场)H——Playing games FWT优化dp
链接:https://www.nowcoder.com/acm/contest/146/H 来源:牛客网 题目描述 Niuniu likes playing games. He has n piles of stones. The i-th pile has ai stones. He wants to play with his good friend, UinUin. Niuniu c...原创 2018-08-14 20:17:39 · 447 阅读 · 0 评论 -
HDU - 6393 Traffic Network in Numazu 树链剖分 基环树
Problem Description Chika is elected mayor of Numazu. She needs to manage the traffic in this city. To manage the traffic is too hard for her. So she needs your help. You are given the map of the ci...原创 2018-08-14 20:28:47 · 377 阅读 · 0 评论