
线段树
文章平均质量分 77
dxyinme
这个作者很懒,什么都没留下…
展开
-
[nowcoder]红球进黑洞
题目链接:https://ac.nowcoder.com/acm/contest/6046/C时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述在心理疏导室中有一种奇特的疏导工具,叫做红球。红球被提前分为了许多正方形小方格。每当有人来找ATB做心理疏导时,ATB就会让他去先玩红球,然后通过红球小格方的高度来判断一个人的压力程度的高低具体地讲,ATB会让该人对于一个序列执行以下操作区间求和,原创 2020-06-17 14:06:24 · 363 阅读 · 0 评论 -
[BZOJ3211]花神游历各国
Time Limit: 5 SecMemory Limit: 128 MBDescriptionInputOutput每次x=1时,每行一个整数,表示这次旅行的开心度Sample Input41 100 5 551 1 22 1 21 1 22 2 31 1 4Sample Output1011111HINT对于100%的数据, n≤100000,m...原创 2018-11-28 14:53:53 · 192 阅读 · 0 评论 -
[HDU3966]Aragorn's Story
Time Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Ara...原创 2018-12-01 09:31:26 · 428 阅读 · 0 评论 -
[HDU5023]A Corrupt Mayor's Performance Art
Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 100000/100000 K (Java/Others)Problem DescriptionCorrupt governors always find ways to get dirty money. Paint something, then sell the worthless p...原创 2019-01-13 19:57:25 · 211 阅读 · 0 评论 -
[ZOJ4089]Little Sub and Isomorphism Sequences
Time Limit: 3 SecondsMemory Limit: 65536 KBLittle Sub has a sequence A1,A2,A3,...,ANA_1,A_2,A_3,...,A_NA1,A2,A3,...,AN. Now he has a problem for you.Two sequences X1,X2,X3,...,XuX_1,X_2,X_3,......原创 2019-01-20 10:29:22 · 2029 阅读 · 0 评论 -
[codeforces803G]Periodic RMQ Problem
time limit per test : 4 secondsmemory limit per test : 512 megabytesYou are given an array aaa consisting of positive integers and qqq queries to this array. There are two types of queries:111 lll ...原创 2019-04-25 17:59:17 · 216 阅读 · 0 评论 -
[hdu4217]Data Structure?
Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionData structure is one of the basic skills for Computer Science students, which is a particular way...原创 2019-07-06 15:11:49 · 171 阅读 · 0 评论 -
[hdu6562][CCPC2018吉林站]Lovers
Problem DescriptionThe Fool comes to a cross-road, filled with energy, confidence and purpose, knowing exactly where he wants to go and what he wants to do. But he comes to a dead stop. A flowering t...原创 2019-07-18 11:17:55 · 342 阅读 · 0 评论 -
[codeforces920F]SUM and REPLACE
time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2000Let D(x)D(x)D(x) be the number of positive divisors of a positive integer xxx. For example, D(2) = 2D(2) = 2D(2) = 2 (222 ...原创 2019-07-23 20:00:19 · 180 阅读 · 0 评论 -
[codeforces 1187D]Subarray Sorting
time limit per test:2 secondsmemory limit per test:256 megabytesYou are given an array a1a_1a1,a2a_2a2,…,ana_nan and an array b1b_1b1,b2b_2b2,…,bnb_nbn.For one operation you can sort in non-d...原创 2019-07-17 01:00:26 · 265 阅读 · 0 评论 -
[codeforces1070C]Cloud Computing
time limit per test : 3 secondsmemory limit per test : 256 megabytesBuber is a Berland technology company that specializes in waste of investor’s money. Recently Buber decided to transfer its infras...原创 2018-11-21 22:13:06 · 392 阅读 · 0 评论 -
[JSOI2008]最大数
题目描述现在请求你维护一个数列,要求提供以下两种操作: 1、 查询操作。 语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。 限制:L不超过当前数列的长度。 2、 插入操作。 语法:A n 功能:将n加上t,其中t是最近一次查询操作的答案(如果还未执行过查询操作,则t=0),并将所得结果对一个固定的常数D取模,将所得答案插入到数列的末尾。 限制:n是整数(可原创 2016-09-14 16:38:14 · 259 阅读 · 0 评论 -
[HDU 6047]Maximum Sequence
Problem Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too eas原创 2017-07-27 20:12:48 · 412 阅读 · 0 评论 -
[BZOJ3747][POI2015]Kinoman
Description共有m部电影,编号为1~m,第i部电影的好看值为w[i]。 在n天之中(从1~n编号)每天会放映一部电影,第i天放映的是第f[i]部。 你可以选择l,r(1<=l<=r<=n),并观看第l,l+1,…,r天内所有的电影。如果同一部电影你观看多于一次,你会感到无聊,于是无法获得这部电影的好看值。所以你希望最大化观看且仅观看过一次的电影的好看值的总和。Input第一行两个整数n原创 2017-11-02 18:36:54 · 243 阅读 · 0 评论 -
[福建师大附中OJ 1264]烽火台
题目描述 烽火台又称烽燧,是重要的防御设施,一般建在险要处或交通要道上。一旦有敌情发生,白天燃烧柴草,通过浓烟表达信息:夜晚燃烧干柴,以火光传递军情。在某两座城市之间有n个烽火台,每个烽火台发出信号都有一定的代价。为了使情报准确的传递,在m个烽火台中至少要有一个发出信号。现输入n、m和每个烽火台发出的信号的代价,请计算总共最少需要话费多少代价,才能使敌军来袭之时,情报能在这两座城市之间准确的...原创 2017-11-15 13:18:05 · 1454 阅读 · 0 评论 -
[POJ3321]Apple Tree
Time Limit: 2000MS Memory Limit: 65536KDescriptionThere is an apple tree outside of kaka’s house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been原创 2017-10-28 16:52:41 · 811 阅读 · 0 评论 -
[POJ3263]Tallest Cow
Tallest Cow Time Limit: 2000MS Memory Limit: 65536KDescriptionFJ’s N(1≤N≤10,000)N(1≤N≤10,000)N (1 ≤ N ≤ 10,000) cows conveniently indexed 1..N are standing in a line. Each cow has a positive i...原创 2018-04-12 17:27:42 · 369 阅读 · 0 评论 -
[BZOJ1798] [Ahoi2009]Seq 维护序列seq
Time Limit: 30 Sec Memory Limit: 64 MBDescription老师交给小可可一个维护数列的任务,现在小可可希望你来帮他完成。 有长为NNN的数列,不妨设为a1,a2,…,aNa1,a2,…,aNa_1,a_2,…,a_N 。有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问数列...原创 2018-08-08 22:23:33 · 145 阅读 · 0 评论 -
[BZOJ1103][POI2007]大都市meg
Time Limit: 10 SecMemory Limit: 162 MBDescription在经济全球化浪潮的影响下,习惯于漫步在清晨的乡间小路的邮递员Blue Mary也开始骑着摩托车传递邮件了。不过,她经常回忆起以前在乡间漫步的情景。昔日,乡下有依次编号为1…n的n个小村庄,某些村庄之间有一些双向的土路。从每个村庄都恰好有一条路径到达村庄1(即比特堡)。并且,对于每个村庄,它到比特...原创 2018-10-26 19:30:33 · 181 阅读 · 0 评论 -
2016 UESTC Training for Data Structures
就做了4题,其他的感觉好难!!QAQ卿学姐与公主某日,百无聊赖的卿学姐打开了某11区的某魔幻游戏 在这个魔幻的游戏里,生活着一个美丽的公主,但现在公主被关押在了魔王的城堡中。 英勇的卿学姐拔出利刃冲向了拯救公主的道路。 走过了荒野,翻越了高山,跨过了大洋,卿学姐来到了魔王的第一道城关。 在这个城关面前的是魔王的精锐部队,这些士兵成一字排开。 卿学姐的武器每次只能攻击一个士兵,并造成一定伤害原创 2016-08-29 12:23:45 · 523 阅读 · 0 评论