博客园 首页 私信博主 显示目录 隐藏目录 管理 动画
摘要: 传送魔法 一开始以为可以直接线段树的,好像还是不行……还是得用Spaly,然后就没啥了。 #include<cstdio> #include<algorithm> #define MN 210000 using namespace std; inline int read(){ int ca=get 阅读全文
posted @ 2017-07-04 16:50 swm_sxt 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 传送门 题解 做法与题解基本无异,不过他说用vector我觉得用链表来得更好一些。 #include<queue> #include<ctime> #include<bitset> #include<vector> #include<cstdio> #include<algorithm> #defi 阅读全文
posted @ 2017-07-04 11:14 swm_sxt 阅读(539) 评论(7) 推荐(0) 编辑
摘要: 传送门 题解 题解里面说得很清楚了。 大约就是单独考虑每个数的贡献,然后看一下每个序列里有多少区间是没有这个数的,乘起来就好了。 为了处理修改我们需要每个值建一棵线段树来搞,但是窝zz了,写了线段树套线段树,比正解多一个log。 一开始想着不调map、set,然后发现特别难写。最后还是调了map…… 阅读全文
posted @ 2017-07-04 10:25 swm_sxt 阅读(585) 评论(0) 推荐(0) 编辑