
暑假集训
文章平均质量分 64
ZoeEot
学生
展开
-
codeforse1285D. Dr. Evil Underscores(01字典树)
D. Dr. Evil Underscores链接: https://codeforces.com/problemset/problem/1285/D.思路应该是挺简单的一个题,但是我考试的时候用的另一个小思路,哎,,做不出来就该换思路的。。正解应该就是按照01字典树插入,然后按照像线段树那样的遍历(如果一个节点有两个子节点,那么对于结果来说,这个节点代表的位置必然是1,就要加上,否者就可以不是1)。当时我觉得这样可能会TLE,因为如果遇到两个的就分开便利,那不就是要遍历2^30?后来想了想才知道,原创 2021-08-27 09:32:46 · 187 阅读 · 0 评论 -
CodeForces - 1547E(思维)
题目链接链接: https://codeforces.com/problemset/problem/1547/E.思路1(思维171ms)每一个点的温度,都有三种可能确定,1.本身的空调 2.从左边传过来 3.从右边传过来。所以从前向后过一遍最小值,再从后往前过一遍最小值就可以了思路1代码#include<iostream>#include<algorithm>#include<cstring>using namespace std;const int原创 2021-08-22 21:46:46 · 209 阅读 · 0 评论 -
CodeForces - 987E(逆序对定理+树状数组)
题目描述E. Petr and PermutationsPetr likes to come up with problems about randomly generated data. This time problem is about random permutation. He decided to generate a random permutation this way: he takes identity permutation of numbers from 1to n and t原创 2021-08-22 15:52:03 · 227 阅读 · 0 评论 -
LCIS HDU - 3308
题目描述LCIS HDU - 3308Given n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length of the longest consecutive increasing subsequence (LCIS) in [a, b].InputT in the first line, indicating t原创 2021-08-21 22:41:44 · 265 阅读 · 0 评论 -
Minimum Inversion Number_HDU1394(树状数组)
题目Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31439 Accepted Submission(s): 17797Problem DescriptionThe inversion number of a given number sequence a1, a2, …, an is原创 2021-08-20 18:04:57 · 70 阅读 · 0 评论 -
Infinite Inversions CodeForces - 540E(树状数组+离散化)
Infinite Inversions CodeForces - 540E题目There is an infinite sequence consisting of all positive integers in the increasing order: p = {1, 2, 3, …}. We performed n swap operations with this sequence. A swap(a, b) is an operation of swapping the elements of原创 2021-08-20 17:56:24 · 148 阅读 · 0 评论 -
A Simple Problem with Integers(线段树)
A Simple Problem with Integers 题目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 ask for the sum of numbers in a give原创 2021-08-16 15:26:12 · 86 阅读 · 0 评论 -
HDU1385—— Minimum Transport Cost
HDU1385—— Minimum Transport Cost题目描述An integer interval [a,b], a < b, is a set of all consecutive integers beginning with a and ending with b.Write a program that: finds the minimal number of elements in a set containing at least two different intege原创 2021-08-04 18:28:43 · 114 阅读 · 0 评论 -
HDU1811Rank of Tetris
题目HDU1811Rank of Tetris自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排。终于,Lele要开始行动了,对N个人进行排名。为了方便起见,每个人都已经被编号,分别从0到N-原创 2021-08-04 00:09:59 · 104 阅读 · 0 评论