splay
天翼之城*
这个作者很懒,什么都没留下…
展开
-
hdu 3487 Play with Chain —— splay区间翻转模板
Problem Description YaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n. At first, the diamonds on the chain is a sequence: 1, 2, 3, …...原创 2018-08-25 08:37:51 · 138 阅读 · 0 评论 -
POJ - 3481 Double Queue —— splay插入删除模板
Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern informatio...原创 2018-08-25 08:38:00 · 174 阅读 · 0 评论 -
3223: Tyvj 1729 文艺平衡树 —— splay区间翻转模板题
Description 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 4 1 Input 第一行为n,m n表示初始序列有n个数,这个序列依次是(1,2……n-1,n) m表示翻转操作次数 接下来m行每行两个数[l,r] 数据保证 1<=l<=r...原创 2018-08-25 08:37:42 · 201 阅读 · 0 评论 -
CODE[VS] 4655 序列终结者 —— splay区间更新,区间翻转,区间求最大值模板
#include<stdio.h> #include<iostream> #include<string.h> #include<algorithm> using namespace std; #define keytree ch[ch[root][1]][0] #define L(x) ch[x][0] #define R(x) ch[x][1] ...原创 2019-09-25 14:32:53 · 153 阅读 · 0 评论