摘要:FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1829Accepted Submission(s): 901Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. Th
阅读全文
摘要:AtlantisTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4691Accepted Submission(s): 2095Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts
阅读全文
摘要:HotelTime Limit:3000MSMemory Limit:65536KTotal Submissions:8968Accepted:3804DescriptionThe 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 Hotel
阅读全文
摘要:Problem FFast Matrix OperationsThere is a matrix containing at most 106elements divided into r rows and c columns. Each element has a location (x,y) where 10)2 x1 y1 x2 y2 vSet each element (x,y) in submatrix (x1,y1,x2,y2) to v3 x1 y1 x2 y2Output the summation, min value and max value of submatrix (
阅读全文
摘要:RMQ with ShiftsIn the traditional RMQ (Range Minimum Query) problem, we have a static arrayA. Then for each query(L,R)(LR), we report the minimum value amongA[L],A[L+ 1], ...,A[R]. Note that the indices start from 1, i.e. the left-most element isA[1].In this problem, the arrayAis no longer static: w
阅读全文
摘要:Mayor's postersTime Limit:1000MSMemory Limit:65536KTotal Submissions:32605Accepted:9469DescriptionThe 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 finally
阅读全文
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6525Accepted Submission(s): 2957Problem 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 the
阅读全文
摘要:单点更新,区间求最值#include
#include
#include
#include
#include
#define N 222222 using namespace std; int num[N]; struct Tree
{ int l; int r; int max;
} tree[N*4]; void push_up(int root)
{ tree[root].max=max(tree[root=tree[root].r) return tree[root].max; int mid=(tree[root].l+...
阅读全文
摘要:单点更新最最基础的线段树,只更新叶子节点,然后把信息用PushUP(int r)这个函数更新上来。hdu1166 敌兵布阵线段树 hdu 1166 敌兵布阵 单点更新区间求和hdu1754 I Hate It线段树 hdu 1754 I Hate It 单点更新 区间求最值hdu1394 Minimum Inversion Numberhdu 1394 Minimum Inversion Number 线段树 逆序数hdu2795 Billboardhdu 2795 Billboard 线段树 单点更新UVa 12299 - RMQ with Shifts 线段树 单点更新poj2828Buy
阅读全文
摘要:Car race gameTime Limit 1000msMemory Limit 65536Kdescription Bob is a game programming specialist. In his new car race game, there are some racers(n means the amount of racers (1 output For each data set in the input print on a separate line, on the standard output, the integer that represe...
阅读全文
摘要:Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6365Accepted Submission(s): 3875Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai
阅读全文
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:41899Accepted:12169Case Time Limit:2000MSDescriptionYou haveNintegers,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 interv
阅读全文
摘要:Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11297Accepted Submission(s): 5591Problem 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 consecu
阅读全文
摘要:I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23163Accepted Submission(s): 9257Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个
阅读全文
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25659Accepted Submission(s): 11092Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人
阅读全文