
树状数组
Kirito_Acmer
这个作者很懒,什么都没留下…
展开
-
hdu 1166敌兵布阵
Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。原创 2015-04-22 13:03:06 · 577 阅读 · 0 评论 -
poj2481 Cows
DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Fa原创 2015-06-03 19:21:08 · 822 阅读 · 0 评论 -
hdu5372 Segment Game
Problem DescriptionLillian is a clever girl so that she has lots of fans and often receives gifts from her fans.One day Lillian gets some segments from her fans Lawson with lengths of 1,2,3...原创 2015-08-11 21:35:47 · 1039 阅读 · 0 评论 -
hdu5289 Assignment
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2555 Accepted Submission(s): 1200Problem DescriptionTom owns a company and he i原创 2015-08-17 11:45:01 · 785 阅读 · 0 评论 -
hdu517 Triple
Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 160 Accepted Submission(s): 72Problem DescriptionGiven the finite multi-set A原创 2015-11-05 19:35:44 · 489 阅读 · 0 评论 -
hdu5497 Inversion
Problem DescriptionYou have a sequence {a1,a2,...,an} and you can delete a contiguous subsequence of length m. So what is the minimum number of inversions after the deletion. Input原创 2015-10-05 21:22:31 · 474 阅读 · 0 评论 -
poj2763 Housewife Wind
Time Limit: 4000MS Memory Limit: 65536KTotal Submissions: 7918 Accepted: 2078DescriptionAfter their royal wedding, Jiajia and Wind hid away in XX Village, to enjoy their or原创 2015-10-09 11:51:16 · 613 阅读 · 0 评论 -
hdu4777 Rabbit Kingdom
Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1927 Accepted Submission(s): 664Problem Description Long long ago, there was a原创 2015-11-11 15:06:30 · 570 阅读 · 0 评论 -
poj2299 Ultra-QuickSort
DescriptionIn 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 seque原创 2015-06-03 14:23:12 · 837 阅读 · 0 评论 -
poj3321 Apple Tree
DescriptionThere 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 carefully nurturing the big apple tree.原创 2015-06-06 13:14:35 · 918 阅读 · 0 评论 -
hdu 01 Matrix
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 605 Accepted Submission(s): 127Problem DescriptionIt's really a simple problem.原创 2015-12-27 17:52:32 · 816 阅读 · 0 评论 -
zjnu1725 COCI (类似二维树状数组模拟)
DescriptionThe 3rd round of COCI is already here! In order to bet on predict the scores, we have assumed the following: If contestant A scored strictly more points than contestant B in each o原创 2016-03-15 19:16:25 · 642 阅读 · 0 评论 -
tju3243 Blocked Road
There are N seaside villages on X island, numbered from 1 to N. N roads are built to connect all of them, which are also numbered from 1 to N, and the road with number i connects the village i and原创 2015-06-10 21:02:49 · 697 阅读 · 0 评论 -
hdu3015 Disharmony Trees
Problem DescriptionOne day Sophia finds a very big square. There are n trees in the square. They are all so tall. Sophia is very interesting in them.She finds that trees maybe disharmony and原创 2015-06-10 20:32:10 · 800 阅读 · 0 评论 -
poj3067 Japan
DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <原创 2015-06-03 20:12:52 · 660 阅读 · 0 评论 -
poj1195 Mobile phones
DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows an原创 2015-06-03 18:03:16 · 617 阅读 · 0 评论 -
HOJ1867 经理的烦恼
My Tags (Edit) Source : HCPC 2005 Spring Time limit : 2 sec Memory limit : 32 MSubmitted : 2946, Accepted : 672Jerry是一家公司销售部门的经理。原创 2015-06-04 16:31:21 · 898 阅读 · 0 评论 -
poj2029 Get Many Persimmon Trees
DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in educa原创 2015-06-04 14:15:21 · 646 阅读 · 0 评论 -
hdu1556 Color the ball
Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。 Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共被涂色的次数。 Sample Inpu原创 2015-06-05 10:31:18 · 788 阅读 · 0 评论 -
poj2155 Matrix
DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 We can change the matrix in the f原创 2015-06-05 10:32:59 · 606 阅读 · 0 评论 -
HOJ2275 Number sequence
Number sequenceMy Tags (Edit) Source : SCU Programming Contest 2006 Final Time limit : 1 sec Memory limit : 64 MSubmitted : 1原创 2015-06-04 14:54:51 · 755 阅读 · 0 评论 -
poj1990 MooFest
DescriptionEvery year, Farmer John's N (1 <= N <= 20,000) cows attend "MooFest",a social gathering of cows from around the world. MooFest involves a variety of events including haybale stacking, f原创 2015-06-06 10:52:48 · 929 阅读 · 0 评论 -
SPOJ 227 Ordering the Soldiers
As you are probably well aware, in Byteland it is always the military officer's main worry to order his soldiers on parade correctly. In Bitland ordering soldiers is not really such a problem. If a pl原创 2015-06-11 11:29:22 · 724 阅读 · 0 评论 -
hdu2852 KiKi's K-Number
Problem DescriptionFor the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a very similar problem, kiki wants to design a container, the co原创 2015-06-11 13:41:29 · 781 阅读 · 0 评论 -
hoj2430 Counting the algorithms
My Tags (Edit) Source : mostleg Time limit : 1 sec Memory limit : 64 MSubmitted : 725, Accepted : 286As most of the ACMers, wy'原创 2015-06-10 18:37:35 · 820 阅读 · 0 评论 -
bzoj3289 : Mato的文件管理
DescriptionMato同学从各路神犇以各种方式(你们懂的)收集了许多资料,这些资料一共有n份,每份有一个大小和一个编号。为了防止他人偷拷,这些资料都是加密过的,只能用Mato自己写的程序才能访问。Mato每天随机选一个区间[l,r],他今天就看编号在此区间内的这些资料。Mato有一个习惯,他总是从文件大小从小到大看资料。他先把要看的文件按编号顺序依次拷贝出来,再用他写的排序程序给文原创 2016-02-04 20:23:10 · 550 阅读 · 0 评论