会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hnzzlxs01の笔记本
博客园
首页
新随笔
联系
订阅
管理
2023年10月31日
字符串
摘要: 字典树 板子题1号, 求某字符串是否出现过及出现几次 AC Code: #include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 5; int n, m; string s; int trie[maxn][26], to
阅读全文
posted @ 2023-10-31 19:57 hnzzlxs01
阅读(31)
评论(0)
推荐(0)
2023年9月14日
图的应用
摘要: 1、描绘路径/图形态,再由此考虑解决方案 2、对于连通性问题,可以简化为一个等价图 3、对于dij,可以由已知的最优状态扩展出未知状态 **4、考虑拆点/分层图 ** 最短路径 Dijkstra算法 求单源最短路 O(m)(稀疏图可用) P4779 【模板】单源最短路径(标准版) 邻接矩阵版本: #
阅读全文
posted @ 2023-09-14 19:53 hnzzlxs01
阅读(36)
评论(0)
推荐(0)
2023年9月2日
图论基础
摘要: # 图的存储 ## [图的存储:B3643](https://www.luogu.com.cn/problem/B3643) **AC Code:** ```cpp #include #include #include using namespace std; #define ll long lon
阅读全文
posted @ 2023-09-02 16:36 hnzzlxs01
阅读(65)
评论(0)
推荐(0)
线段树
摘要: # 建树: ```cpp int a[100005],d[100005]; void build(int s,int e,int p){// 建树 // 对区间[s,t]建立线段树,当前根编号为p if(s==e){ d[p]=a[s]; return ; } int m=s+((e-s)>>1);
阅读全文
posted @ 2023-09-02 16:35 hnzzlxs01
阅读(56)
评论(0)
推荐(0)
公告