【Codeforces 438 D】The Child and Sequence
2017-04-19 20:57
483 查看
Description
长度为n的序列,支持单点修改
区间mod x
查询区间和
1 ≤ n, m ≤ 10^5
序列,操作中的值<=10^9
小清新线段树
首先,不看修改操作看区间mod x
发现每个值模了一个数只会变小
而且变小就至少除以2
如果区间最大值小于x,直接退出了(小剪枝)
如果区间全部相等,相当于一个区间减的操作
那么每个点最多修改log次
但是有修改操作
貌似还是可以做的,感性理解起来加上一个数不会影响太多
并不会证复杂度QAQ
相关文章推荐
- codeforces438 D The Child and Sequence
- [均摊复杂度线段树]Codeforces 438D. The Child and Sequence
- codeforces 438D. The Child and Sequence(线段树)
- CF(438D) The Child and Sequence(线段树)
- Codefroces 438D. The Child and Sequence(线段树)
- [均摊 平衡树 || 线段树] Codeforces 438D #250 (Div. 1) D. The Child and Sequence
- 438D - The Child and Sequence
- CF(438D) The Child and Sequence(线段树)
- CodeForces 438 C.The Child and Polygon(dp+计算几何)
- CodeForces 438 E.The Child and Binary Tree(生成函数+FFT)
- Codeforce 438D-The Child and Sequence
- CF438D(The Child and Sequence-线段树mod x)
- Codeforces-743B-Chloe and the sequence(二进制思维题)
- Codeforces Round #250 (Div. 1) D. The Child and Sequence 线段树 区间求和+点修改+区间取模
- 【Codeforces 743 BChloe and the sequence 】
- Codeforces Round #250 (Div. 1) D. The Child and Sequence (线段树)
- codeforces 743 B Chloe and the sequence(递归)
- G - The Child and Set-CodeForces 437B-水题
- The Child and Sequence(线段树)
- CodeForces 437D -- The Child and Zoo(并查集+贪心)