摘要: #include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #define N 100005 using namespace std; int read() { int x=0; char ch; bool bo 阅读全文
posted @ 2016-05-29 20:55 ACist 阅读(151) 评论(0) 推荐(0)
摘要: 做法:三维,然后这题正解是传统的cdq分治+排序+树状数组,设花的三个属性为x,y,z,我们将花按x为第一关键字,y为第二关键字,z为第三关键字排序,将属性完全相同的缩成一朵花即可,同时维护sum数组,即属形为(x,y,z)的个数,所以在维护树状数组的时候不能+1,而应该+sum[x]。排序后,后面 阅读全文
posted @ 2016-05-29 20:40 ACist 阅读(188) 评论(0) 推荐(0)
摘要: 传送们:http://www.lydsy.com/JudgeOnline/problem.php?id=3196 题解:线段树+treap #include<algorithm> #include<iostream> #include<cstring> #include<cmath> #includ 阅读全文
posted @ 2016-05-29 20:33 ACist 阅读(182) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1901 题解:树套树,线段树+treap(sb的我以为有多组数据。。。。。。呃呵呵呵狂RE) #include<iostream> #include<cstring> #include<cmat 阅读全文
posted @ 2016-05-29 20:31 ACist 阅读(235) 评论(0) 推荐(0)