摘要: P4568 [JLOI2011]飞行路线 #include using namespace std;int n,m,k;int s,t;struct node{ int v,d;};struct no1{ int v,d,k; bool operator y... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(30) 评论(0) 推荐(0)
摘要: P1266 速度限制 #includeusing namespace std;int n,m,d;struct node{ int d,v,l;};struct no1{ int v; double d; bool operator y.d; }};vect... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(27) 评论(0) 推荐(0)
摘要: 这玩意今天才知道,但感觉用处不大啊。。。 P5905 【模板】Johnson 全源最短路 #include using namespace std;int n,m;struct node1{ int d,w;};vector e[30010];struc... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(28) 评论(0) 推荐(0)
摘要: #include #include #include #include #include using namespace std;int n,m,point[1001],last[2001],cnt,dis[1001],vis[1001];bool inq[... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(19) 评论(0) 推荐(0)
摘要: 链接 欧拉回路板题 AC代码: ​#include using namespace std; int n,G[151][151];char x,y;int cntIN[151];bool ext[151];int sum;char cc[10000000];i... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(28) 评论(0) 推荐(0)
摘要: #include using namespace std;int n,m,e;int G[501][501],match[501],vis[501];int x,y;int ans;int dfs(int now){ for (int i = 1; i ... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(23) 评论(0) 推荐(0)
摘要: 链接 代码先行 #include using namespace std;const int maxx = (1 = i && z[i - l] l + z[l]) l = i,r = i + z[i] - 1; //cout = 0; i--... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(33) 评论(0) 推荐(0)
摘要: 两个重要的点:1.i - l 2.r 一个简单的证明: (来源:题解-洛谷P5410 【模板】扩展 KMP(Z 函数) - George1123 - 博客园) 借助前面处理的两个点来避免重复匹... 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(85) 评论(0) 推荐(0)
摘要: 板子已会 2021.9.23(用的是双哈希,模数19260817和19660813) 模数可用1e9 + 9 和 1e9 + 7 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(53) 评论(0) 推荐(0)
摘要: 链接 技巧:排序,数据有序化,更好处理 阅读全文
posted @ 2022-07-13 19:57 此间无物 阅读(11) 评论(0) 推荐(0)