【Codeforces 438 D】The Child and Sequence
来源:互联网 发布:上海知恩服饰怎么样 编辑:程序博客网 时间:2024/05/15 23:43
Description
长度为n的序列,支持
- 单点修改
- 区间mod x
- 查询区间和
1 ≤ n, m ≤ 10^5
序列,操作中的值<=10^9
小清新线段树
首先,不看修改操作
看区间mod x
发现每个值模了一个数只会变小
而且变小就至少除以2
如果区间最大值小于x,直接退出了(小剪枝)
如果区间全部相等,相当于一个区间减的操作
那么每个点最多修改log次
但是有修改操作
貌似还是可以做的,感性理解起来加上一个数不会影响太多
并不会证复杂度QAQ
0 0
- CodeForces 438D The Child and Sequence
- 【Codeforces 438 D】The Child and Sequence
- CODEFORCES 438D The Child and Sequence <二叉树>
- [题解]codeforces 438d The Child and Sequence
- Codeforce 438D-The Child and Sequence
- Codeforces Round #250 (Div. 1) D. The Child and Sequence
- Codeforces Round #250 (Div. 1) D. The Child and Sequence
- [均摊 平衡树 || 线段树] Codeforces 438D #250 (Div. 1) D. The Child and Sequence
- Codeforces Round #250 Div1D 438D The Child and Sequence 线段树+势能分析
- CodeForces 438D The Child and Sequence 数据结构+点更新(赋值)+区间求和
- codeforces 438D The Child and Sequence(线段树:单点更新+区间取模+区间和)
- [均摊复杂度线段树]Codeforces 438D. The Child and Sequence
- [均摊复杂度线段树] Codeforces #438D. The Child and Sequence
- CF(438D) The Child and Sequence(线段树)
- CF 438D The Child and Sequence [线段树]
- CF 438D The Child and Sequence(线段树取模)
- Codeforces Round #250 (Div. 1) D. The Child and Sequence(线段树暴力)
- Codeforces Round #250 D - The Child and Sequence/[TYVJ3838] DQS和序列(by 帝江&Darkfalmes)
- 模板_Dijkstra最短路径算法
- Appframework3.0下非主页实现iscroll
- Unity —— 从UE4到Unity的转变和思考
- 数值作业:顺序消去法解线性方程组之C语言代码
- ZereneStacker 1.04 T201602151850 for Windows / Mac 焦点堆叠软件 简体中文 最新版汉化
- 【Codeforces 438 D】The Child and Sequence
- COGS 732. [网络流24题] 试题库
- 【IMWeb训练营作业】todo list
- [Java学习笔记]增强for循环和Map的两种读取方式
- Error:Failed to resolve: com.afollestad:material-dialogs:
- Swfit中枚举的总结以及使用
- LA3708 墓地雕塑
- Gcc编译器的工作流程
- Django 学习笔记二