摘要:
P3378 【模板】堆 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N = 1e6; int h[N], s; void up(int u) { while(u / 2 阅读全文
摘要:
P3375 【模板】KMP字符串匹配 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N =1e6 + 10; char s[N], p[N]; int ne[N]; in 阅读全文
摘要:
P3366 【模板】最小生成树 //prim算法求最小生成树#include <iostream> #include <cstring> using namespace std; const int N = 5010, INF = 0x3f3f3f3f; int n, m, d[N], g[N][N 阅读全文