【主席树】【线段树】Data Structure Special Training 2 T3 intkth 题解
2017-04-04 21:32
316 查看
Problem 3. intkth
Input file: intkth.in
Output file: intkth.out
Time limit: 3 seconds
Memory limit: 512 MB
我看好你哟。
给你一个长度为n 的序列,有m 个操作:
• modify u x 将第u 个数修改为x
• query l r k 询问区间[l; r] 中第k 小的数1
Input
第1 行2 个整数:n m,表示序列长度和操作数。
第2 行n 个整数:a1 a2 a3 : : : an,表示给定序列。
接下来m 行,每行表示上面的某个操作。
Output
对于每个询问操作,输出其结果。
Sample
intkth.in intkth.out
5 5
5 2 1 3 4
query 1 4 3
modify 4 5
query 1 4 3
modify 1 3
query 1 4 3
353
Note
• 对于30% 的数据,1 nm 103
• 对于100% 的数据,1 nm 105,1 aiux n,1 k r
Input file: intkth.in
Output file: intkth.out
Time limit: 3 seconds
Memory limit: 512 MB
我看好你哟。
给你一个长度为n 的序列,有m 个操作:
• modify u x 将第u 个数修改为x
• query l r k 询问区间[l; r] 中第k 小的数1
Input
第1 行2 个整数:n m,表示序列长度和操作数。
第2 行n 个整数:a1 a2 a3 : : : an,表示给定序列。
接下来m 行,每行表示上面的某个操作。
Output
对于每个询问操作,输出其结果。
Sample
intkth.in intkth.out
5 5
5 2 1 3 4
query 1 4 3
modify 4 5
query 1 4 3
modify 1 3
query 1 4 3
353
Note
• 对于30% 的数据,1 nm 103
• 对于100% 的数据,1 nm 105,1 aiux n,1 k r
相关文章推荐
- 【线段树】Data Structure Special Training 1 T2 Rise 题解
- 【线段树】【数据结构】Data Structure Special Training 2 T1 setmod 题解
- 【扫描线】【线段树】Data Structure Special Training 2 T2 area 题解
- 【逆序对】【线段树】【树状数组】Data Structure Special Training 1 T1 rotinv 题解
- 【有序链剖】Data Structure Special Training 1 T3 seqmod 题解
- uestc data structure training f 秋实大哥与妹纸
- 2016 UESTC Training for Data Structures A - 卿学姐与公主 CDOJ 1324 线段树
- UESTC_秋实大哥与线段树 2015 UESTC Training for Data Structures<Problem M>
- ZOJ3998:Yet Another Data Structure Problem(线段树区间更新)
- Senior Data Structure · 浅谈线段树(Segment Tree)
- CDOJ1598-线段树合并(2017 UESTC Training for Data Structures G)
- OpenJudge cdqz/Data Structure Challenge 2 (Problem 5822) - 可持久化线段树
- 【推导】【线段树】hdu5929 Basic Data Structure
- 2016 UESTC Training for Data Structures F - 郭大侠与“有何贵干?” CDOJ 1335 线段树 扫描线 离散化
- [Data]可持久化线段树-主席树
- 2016 UESTC Training for Data Structures A题 线段树
- hdu Data Structure? 线段树
- 2016 UESTC Training for Data Structures A - 卿学姐与公主 线段树
- hdu Data Structure? 线段树
- 主席树/可持久化线段树简介(洛谷P3834/P3919)