![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
splay
QinggegeQAQ
南有乔木不可休 汉有游女不可求
展开
-
【bzoj3173】: [Tjoi2013]最长上升子序列
ms是个简单的splay+nlogn的最长上升子序列。。? 但是我老是搞不清顺序怎么办0.0 根据题目加入的顺序发现的性质要注意阿0.0 orzorzlyh#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int N=200011; const原创 2016-02-25 10:28:22 · 711 阅读 · 0 评论 -
【bzoj1604】: [Usaco2008 Open]Cow Neighborhoods 奶牛的邻居
先是曼哈顿距离的变换 一维排序 另一维用splay维护前驱和后继 判断一下距离是否小于c 如果小于并查集并起来 就行了 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<map> using namespace std; const int N=210011; const int i原创 2016-02-26 22:07:33 · 598 阅读 · 0 评论