
线段树&数状数组
文章平均质量分 63
Low丶Coder
这个作者很懒,什么都没留下…
展开
-
HDU 1754 I Hate It(线段树入门)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 92308 Accepted Submission(s): 35042Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当...原创 2018-04-23 11:34:16 · 145 阅读 · 0 评论 -
Codeforces Gym 100796E Permutation Polygon [树状数组]
E. Permutation PolygonThere are n cities in Regularia, Alice's homeland. They are located at the vertices of a regular n-gon. The cities are numbered from 1 to nin a clockwise order (see the figure)...原创 2018-08-23 17:38:11 · 469 阅读 · 0 评论 -
Problem J. Jim and the Skyscrapers(线段树)
Problem J. Jim and the Skyscraper题意:给定一个序列, 要你找出区间满足:区间首尾元素相等且中间元素均小于首尾元素。要求你找出这样的区间个数解法:线段树首先存储每个数字所有的出现位置,然后从最小的数开始遍历(遍历数字)对于某个数字 如果出现的次数大于等于2然后我们要做的事情是 将所有的位置进行划分:如果所有的位置之间任意两个数都可以,则答...原创 2018-09-08 00:45:20 · 133 阅读 · 0 评论 -
Hackerrank Subsequence Weighting(单调set 数状数组)
A subsequence of a sequence is a sequence which is obtained by deleting zero or more elements from the sequence. You are given a sequence A in which every element is a pair of integers i.e A = [(a...原创 2018-09-14 15:13:06 · 518 阅读 · 0 评论