会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
IrIrIrllleaf
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
2020年4月5日
[省赛训练(DP)]Course Selection System
摘要: 题面: There are n courses in the course selection system of Marjar University. The i-th course is described by two values: happiness Hi and credit Ci. I
阅读全文
posted @ 2020-04-05 21:29 IrIrIrllleaf
阅读(293)
评论(0)
推荐(0)
2020年4月2日
Trie(字典树)的基本操作与应用(一般与字符串前缀相关)
摘要: 字典树是一种树型结构,可用于较高效的处理字符串前缀相关问题,实际应用和搜索引擎密切相关。 此图即为字典树,根节点不存储字符,每个根节点有26(52)颗子树。 建树代码: const int maxn = 1e6 + 5; int v[maxn],tree[maxn][26]; //tree里存每个节
阅读全文
posted @ 2020-04-02 20:51 IrIrIrllleaf
阅读(268)
评论(0)
推荐(0)
2020年4月1日
[算法学习]欧拉筛
摘要: owowowow欧拉筛可以作为一种素数筛,相比埃氏筛来讲性能更加优越 埃氏筛的时间复杂度是O(nloglogn),而欧拉筛是线性复杂度。 代码: 1 const int maxn = 1e8 + 5; 2 bool isprime[maxn]; 3 int prime[maxn], psz; 4 i
阅读全文
posted @ 2020-04-01 22:14 IrIrIrllleaf
阅读(271)
评论(0)
推荐(0)
上一页
1
2
3
公告