随笔分类 -  线段树 树状数组

摘要:Sequence operationTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4910Accepted Submission(s): 1432Problem Descriptionlxhgww got a sequence contains n characters which are all '0's or '1's.We have five operations here:Change operati 阅读全文
posted @ 2013-10-03 14:12 线性无关 阅读(112) 评论(0) 推荐(0)
摘要:LCISTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3151Accepted Submission(s): 1389Problem DescriptionGiven 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 conse 阅读全文
posted @ 2013-10-03 00:33 线性无关 阅读(129) 评论(0) 推荐(0)
摘要:Vases and FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1571Accepted Submission(s): 625 Problem Description Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flo. 阅读全文
posted @ 2013-09-28 23:24 线性无关 阅读(128) 评论(0) 推荐(0)
摘要:Black And WhiteTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2964Accepted Submission(s): 936 Problem DescriptionThere are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color of 阅读全文
posted @ 2013-09-26 20:53 线性无关 阅读(132) 评论(0) 推荐(0)
摘要:H -PointsTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionPete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point(0, 0)is located in the bottom-left cor 阅读全文
posted @ 2013-09-25 18:21 线性无关 阅读(152) 评论(0) 推荐(0)
摘要:小明系列问题——小明序列Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1264Accepted Submission(s): 344 Problem Description 大家都知道小明最喜欢研究跟序列有关的问题了,可是也就因为这样,小明几乎已经玩遍各种序列问题了。可怜的小明苦苦地在各大网站上寻找着新的序列问题,可是找来找去都是自己早已研究过的序列。小明想既然找不到,那就自己来发明一个新的序列问题吧!小明想啊想,终于想出了一个新的序列问. 阅读全文
posted @ 2013-09-25 01:54 线性无关 阅读(329) 评论(0) 推荐(0)
摘要:CowsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 10552Accepted: 3478DescriptionFarmer 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. Farmer John has N cows (we 阅读全文
posted @ 2013-09-23 20:48 线性无关 阅读(156) 评论(0) 推荐(0)
摘要:Mayor's postersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 35574Accepted: 10323DescriptionThe 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. The city council has fi 阅读全文
posted @ 2013-09-23 18:08 线性无关 阅读(126) 评论(0) 推荐(0)
摘要:HotelTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 9844Accepted: 4225DescriptionThe 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 agent, has named the Bullmoose Ho 阅读全文
posted @ 2013-09-23 07:43 线性无关 阅读(176) 评论(0) 推荐(1)
摘要:Buy TicketsTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 10964Accepted: 5342DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedul 阅读全文
posted @ 2013-09-23 02:53 线性无关 阅读(177) 评论(0) 推荐(1)
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7969Accepted Submission(s): 3533 Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is t 阅读全文
posted @ 2013-09-23 02:26 线性无关 阅读(129) 评论(0) 推荐(1)
摘要:I Hate It Time Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 26563Accepted Submission(s): 10548Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,... 阅读全文
posted @ 2013-07-30 19:36 线性无关 阅读(140) 评论(0) 推荐(0)
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 27410Accepted: 12868Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with som 阅读全文
posted @ 2013-05-26 02:56 线性无关 阅读(697) 评论(0) 推荐(0)