随笔分类 -  线段树成段更新

hdu 3954 Level up
摘要:Level upTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2381Accepted Submission(s): 648Problem DescriptionLevel up is the task of all online games. It's very boooooooooring. There is only level up in those games, except level up.In a online ga 阅读全文

posted @ 2012-10-24 23:31 江财小子 阅读(402) 评论(0) 推荐(0) 编辑

HDU 4288 Coder
摘要:CoderTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1260Accepted Submission(s): 551Problem Description In mathematics and computer science, an algorithm describes a set of procedures or instructions that define a procedure. The term has become.. 阅读全文

posted @ 2012-09-20 17:29 江财小子 阅读(510) 评论(0) 推荐(0) 编辑

POJ 2452 Sticks Problem
摘要:Sticks ProblemTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 8623Accepted: 2222DescriptionXuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, ...Sn. After measuring the length of each stick Sk (1 <= k <= n), she finds that 阅读全文

posted @ 2012-09-14 23:54 江财小子 阅读(387) 评论(0) 推荐(0) 编辑

Hdu 4267 A Simple Problem with Integers
摘要:A Simple Problem with IntegersTime Limit: 5000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1038Accepted Submission(s): 371Problem DescriptionLet A1, A2, ... , AN be N elements. You need to deal with two kinds of operations. One type of operation is to add a giv 阅读全文

posted @ 2012-09-12 22:42 江财小子 阅读(451) 评论(0) 推荐(0) 编辑

hdu 4325 Flowers
摘要:Problem F Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 332Accepted Submission(s): 143 Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flower 阅读全文

posted @ 2012-08-03 13:34 江财小子 阅读(268) 评论(0) 推荐(0) 编辑

hdu 4027 Can you answer these queries?
摘要:Can you answer these queries?Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 4315Accepted Submission(s): 1036Problem DescriptionA lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to 阅读全文

posted @ 2012-08-01 08:47 江财小子 阅读(454) 评论(0) 推荐(0) 编辑

hdu 3333 Turing Tree
摘要:Turing TreeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1973Accepted Submission(s): 654Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solu 阅读全文

posted @ 2012-07-31 17:17 江财小子 阅读(607) 评论(0) 推荐(0) 编辑

hdu 3016 Man Down
摘要:Man DownTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1146Accepted Submission(s): 393Problem Des... 阅读全文

posted @ 2012-07-31 13:10 江财小子 阅读(246) 评论(2) 推荐(0) 编辑

POJ 2482 Stars in Your Window
摘要:Stars in Your WindowTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7250Accepted: 1942DescriptionFleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful Zhuhai Campus, 4 years ago, from the moment I saw you sm 阅读全文

posted @ 2012-07-28 16:24 江财小子 阅读(432) 评论(0) 推荐(0) 编辑

POJ 2777 Count Color
摘要:Count ColorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 26788Accepted: 8003DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L centimeter, L is a 阅读全文

posted @ 2012-07-25 08:33 江财小子 阅读(128) 评论(0) 推荐(0) 编辑

POJ 2528 Mayor's posters
摘要:Mayor's postersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 26695Accepted: 7711DescriptionThe 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 fin 阅读全文

posted @ 2012-07-18 16:46 江财小子 阅读(138) 评论(0) 推荐(0) 编辑

POJ 3468 A Simple Problem with Integers
摘要:A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 31956Accepted: 9089Case Time Limit: 2000MSDescriptionYou 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 giv 阅读全文

posted @ 2012-07-18 12:49 江财小子 阅读(179) 评论(0) 推荐(0) 编辑

HDU 1698 Just a Hook
摘要:Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8450Accepted Submission(s): 4090Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut 阅读全文

posted @ 2012-07-18 10:21 江财小子 阅读(302) 评论(0) 推荐(0) 编辑

HDU 2828 Buy Tickets
摘要:Buy TicketsTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 7553Accepted: 3599DescriptionRailway 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 schedule 阅读全文

posted @ 2012-07-18 09:17 江财小子 阅读(410) 评论(0) 推荐(0) 编辑

HDU 1394 Minimum Inversion Number
摘要:Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3973Accepted Submission(s): 2380Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai 阅读全文

posted @ 2012-07-17 21:53 江财小子 阅读(673) 评论(3) 推荐(0) 编辑

HDU 1754 I Hate It
摘要:I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15716Accepted Submission(s): 6099Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个 阅读全文

posted @ 2012-07-17 15:16 江财小子 阅读(105) 评论(0) 推荐(0) 编辑

HDU 1166 敌兵布阵
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15926Accepted Submission(s): 6983Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数 阅读全文

posted @ 2012-07-17 14:41 江财小子 阅读(253) 评论(0) 推荐(0) 编辑

POJ 4047Garden
摘要:金华邀请赛题目D线段树#include <iostream>#include <cstdio>#include <cstring>using namespace std;struct node{ int l,r; int mx; int re;};node lt[800000];int n,Max;int a[200003],b[200003];void built(int l,int r,int k)//建树{ lt[k].l=l; lt[k].r=r; lt[k].re=0; if(l==r) { lt[k].mx=b[l]; return ; } in 阅读全文

posted @ 2012-05-20 08:53 江财小子 阅读(189) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示