自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 后缀数组 - 模板

void work(int *s, int n, int m) {    int *x = t;    int *y = t2;    for (int i = 1; i <= m; i++) c[i] = 0;    for (int i = 1; i <= n; i++) c[x[i] = s[i]]++;    for (int i = 1; i <= m; i++) c[...

2018-04-06 12:41:18 213

原创 Dijkstra(Heap) - 模板

#include <queue> #include <vector> struct Edge { int u, v, dist; }; struct Heapnode { int d, u; bool operator < (const Heapnode &rhs) const { return d > rhs...

2018-02-26 18:09:39 204

原创 Tarjan - 模板

1、求双连通分量#include <vector> #include <stack> struct Edge { int u, v; } int pre[maxn], isct[maxn], bccno[maxn]; int dfs_clock, bcc_cnt; vector<int> G[maxn], bcc[maxn]; stack<i...

2018-02-26 17:29:27 202

原创 匈牙利 - 模板

int nx, ny; int edge[maxn][maxn]; int cx[maxn], cy[maxn]; bool vis[maxn]; int path(int u) { int v; for (v = 1; v <= ny; v++) { if (edge[u][v] && !vis[v]) { vis[...

2018-02-23 10:40:56 194

原创 BellmanFord(费用流) - 模板

struct Edge { int from, to, cap, flow, cost; }; struct MCMF { int n, m, s, t; vector<Edge> edges; vector<int> G[maxn]; int inq[maxn]; int d[maxn]; int p[maxn];...

2018-02-22 23:43:18 173

原创 Dinic - 模板

struct Edge { int from, to, cap, flow; }; struct Dinic { int n, m, s, t; vector<Edge> edges; vector<int> G[maxn]; bool vis[maxn]; int d[maxn]; int cur[maxn];...

2018-02-21 23:37:27 160

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除