![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
特殊的数据结构
shemplle
这个作者很懒,什么都没留下…
展开
-
优先队列小结
优先队列priority_queue头文件#include<queue>;基本优先队列的形式priority_queue<int>que;作用:对队列里的元素默认从大到小排列。复杂一点的优先队列:priority_queue<type, container, functional>que;type 为数据类型, container 为保存数据...原创 2018-04-12 19:39:43 · 200 阅读 · 0 评论 -
Bzoj 3224.普通平衡树 [ 权值线段树 ]
Description您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 1. 插入x数 2. 删除x数(若有多个相同的数,因只删除一个) 3. 查询x数的排名(若有多个相同的数,因输出最小的排名) 4. 查询排名为x的数 5. 求x的前驱(前驱定义为小于x,且最大的数) 6. 求x的后继(后继定义为大于x,且最小的数)Input第一行为n,表...原创 2018-09-05 21:54:48 · 546 阅读 · 0 评论 -
[ACM-ICPC 2018 徐州赛区网络预赛] Ryuji doesn't want to study [线段树]
Problem DescribeRyuji is not a good student, and he doesn’t want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, the longer he learns, the fewe...原创 2018-09-11 15:42:55 · 186 阅读 · 0 评论 -
POJ--3667 Hotel
HotelDescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agen...原创 2018-08-17 14:24:50 · 323 阅读 · 0 评论 -
Ultra-QuickSort (利用归并排序求逆序数)
In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted i...原创 2018-08-18 19:56:28 · 225 阅读 · 0 评论 -
Tunnel Warfare [HDU--1540]
Problem Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels la...原创 2018-08-15 13:55:54 · 174 阅读 · 0 评论 -
POJ - 2227 Count Color
Count ColorDescription Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board wit...原创 2018-08-01 11:24:18 · 168 阅读 · 0 评论 -
poj- 2528 Mayor's posters
Mayor’s postersDescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. ...原创 2018-08-05 21:08:27 · 159 阅读 · 0 评论 -
POJ --3468 A Simple Problem with Integers
Description You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to a...原创 2018-07-31 22:29:52 · 154 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第三场)2018 C , Shuffle Cards ( rope )
题目描述 Eddy likes to play cards game since there are always lots of randomness in the game. For most of the cards game, the very first step in the game is shuffling the cards. And, mostly the randomne...原创 2018-07-27 20:48:01 · 262 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(2018.第一场)J 题
链接:https://www.nowcoder.com/acm/contest/139/J来源:牛客网 题目描述Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2),...原创 2018-07-22 12:07:13 · 267 阅读 · 0 评论 -
士兵杀敌(五)
题目描述:南将军麾下有百万精兵,现已知共有M个士兵,编号为0~M,每次有任务的时候,总会有一批编号连在一起人请战(编号相近的人经常在一块,相互之间比较熟悉),最终他们获得的军功,也将会平分到每个人身上,这样,有时候,计算他们中的哪一个人到底有多少军功就是一个比较困难的事情。 在这样的情况下,南将军却经常会在许多次战役之后询问军师小工第i号士兵到第j号士兵所有人的总军功数。请你帮助军...原创 2018-07-20 22:36:40 · 151 阅读 · 0 评论 -
HDU-1394 Minimum Inversion Number
Problem Description The inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence of numbers a1, a2, …, an,...原创 2018-07-29 10:58:04 · 159 阅读 · 0 评论 -
HDU-1698 Just a Hook
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 41010 Accepted Submission(s): 19775Problem DescriptionIn the game of DotA, ...原创 2018-07-24 11:21:35 · 268 阅读 · 0 评论 -
HDU-1754 I Hate It ( 线段树入门 + update操作 )
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 96984 Accepted Submission(s): 36624 Problem Description很多学校流行一种比较的习惯。老师们很喜欢询...原创 2018-07-23 21:47:44 · 233 阅读 · 0 评论 -
[ 字典树题目 ]
Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,...原创 2018-09-06 20:50:08 · 336 阅读 · 0 评论