数据结构
文章平均质量分 78
飞不起的弱鸡
这个作者很懒,什么都没留下…
展开
-
Tyvj 1730 二逼平衡树 (树套树裸题)
题目链接Description您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:1.查询k在区间内的排名2.查询区间内排名为k的值3.修改某一位值上的数值4.查询k在区间内的前驱(前驱定义为小于x,且最大的数)5.查询k在区间内的后继(后继定义为大于x,且最小的数)Input第一行两个数 n,m 表示长度为n的有序原创 2015-08-22 10:23:19 · 721 阅读 · 0 评论 -
multi_treap模板(来源于上决)
完整性有待验证#include#include#include#define inf 0x3f3f3fstruct node{ node* ch[2]; int va,num,s; int ran; int cmp(int x) { if(x==va) return -1; return (x<va?0:1);原创 2015-08-21 10:48:03 · 373 阅读 · 0 评论 -
SWUST ACM 训练题部分题解 hdu1384 && hdu3666 && hdu 4786 &&uva 1395 && uva 1151
训练题网址:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=99765#problem/AB - Intervals (hdu1384)题意:给你n个区间每个区间的范围为[l,r],让你确定num个整数,使这num个整数在第i个区间[li,ri]至少有Ci个共同的数。题目先给你一个数n,接下来n行告诉你三个数li,ri,Ci,输出原创 2015-11-21 21:10:10 · 857 阅读 · 0 评论 -
CodeForces - 620E New Year Tree (线段树+dfs序)
E. New Year Treetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe New Year holidays are over, but Resha doesn't want to throw原创 2016-01-27 18:05:58 · 1066 阅读 · 1 评论 -
CodeForces 703D Mishka and Interesting sum
D. Mishka and Interesting sumtime limit per test3.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Mishka enjoys programming. Sin原创 2016-08-08 10:46:25 · 477 阅读 · 0 评论 -
hiho 1383 The Book List
The Book List时间限制:1000ms单点时限:1000ms内存限制:256MB描述The history of Peking University Library is as long as the history of Peking University. It was build in 1898. At the end of year 2015,原创 2016-09-25 09:48:56 · 602 阅读 · 0 评论