
线段树
文章平均质量分 86
龟大仙
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU4267 A Simple Problem with Integers
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4267 题意:题目中有两种操作 1.每隔k点更新; 2.查询最底层的叶子节点的值; 思路:因为k不是固定的,但是k的范围又很小,只有1-10,所以我们不妨在每个区域都开一个数组来标记不同的k,代表从最左端的那个点开始,在此区域内,每隔k个点都是有效点。要注意的是,每个区域的起始位置的那个点一定要原创 2015-04-16 22:25:01 · 753 阅读 · 0 评论 -
CodeForces 514D R2D2 and Droid Army
D. R2D2 and Droid Army An army of n droids is lined up in one row. Each droid is described by m integers a1, a2, ..., am, where ai is the number of details of thei-th type in this droid's m原创 2015-04-16 22:32:31 · 931 阅读 · 0 评论 -
CODEFORCES ROUND #321 (DIV. 2) E.Kefa and Watch(线段树+hash)
题目链接 题意: 给定n, m, k 长度为n的数字串 m+k个操作 1 l r c :把[l,r]的所有字符改成c 2 l r d :询问[l, r]的周期是否为d 所谓周期 x 就是 (1 ≤ x ≤ |s|), if si = si + x for all i from 1 to |s| - x) 对于每个询问输出YES或NO 思路: 若字符串S(下标原创 2015-10-04 20:50:30 · 492 阅读 · 0 评论