摘要:
struct Edge { int lst; int v; int w; }; const int maxn = 1e5+500; const int maxe = (1e5+500) * 2; const int inf = 0x3f3f3f3f; class ISAP { public : Edge edge[maxe]; int head[ma... 阅读全文
摘要:
#include #include #include using namespace std; const int maxe = 1e4+50; struct Edge { int lst; int to; int w; }edge[maxe * 2]; int head[128]; int qsz; inline void add(int u, in... 阅读全文
摘要:
注意, qsz 应该是从2开始的 因为用到了^1无向图 #include #include using namespace std; const int maxn = 1e3+50; struct Edge{ int st; int lst; int to; }edge[maxn*5]; int head[maxn]; int qsz; inline v... 阅读全文
摘要:
dfs #include #include using namespace std; const int maxn = 1e5+50; struct Edge{ int lst; int to; }edge[maxn*5]; int head[maxn]; int qsz; inline void add(int u, int v) { edge[qsz]... 阅读全文
摘要:
#include <queue> #include <cstdio> #include <cstring> using namespace std; const int maxn = 1e6+500; char str[maxn]; class AC { int next[maxn][26]; in 阅读全文