摘要:
模板:洛谷P5357 code: #include<bits/stdc++.h> using namespace std; const int N=2e5+10; int fail[N],tr[N][26],idx,n,times[N]; //end[i]表示第i个字符的结尾编号 int ed[N] 阅读全文
posted @ 2025-09-24 23:57
xdhking
阅读(6)
评论(0)
推荐(0)
摘要:
概念 树结构是n个顶点,n-1条边,如果多加一条边会变成一个图结构,此时这个图结构中只有一个环,这样的图称为基环树,即n 个点 n 条边的无重边无自环的连通无向图 code,模板洛谷P12145: #include<bits/stdc++.h> using namespace std; const 阅读全文
posted @ 2025-09-24 17:35
xdhking
阅读(20)
评论(0)
推荐(0)

浙公网安备 33010602011771号