1 a:詢問有沒有連續長度為a的空位置,插進最左邊2 a b :【a,a+b-1】區間清空結點記錄的資訊:1:區間內最長的連續空位(msum)2:從當前區間的最左端開始的連續空位長度(lsum)3:從當前區間的最右端開始的連續空位長度(往左邊數)(rsum)區間的最值就是max(左右子節點最長連續空位的最大值,lsum【rt<<1|1】+rsum[rt<<1])其他就基本上和一般的成段更新,懶惰標記沒什麼區別了View Code
Catching FishTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 943 Accepted Submission(s): 335Problem DescriptionIgnatius likes catching fish very much. He has a fishnet whose shape is a
F. Spreading the Wealth ProblemA Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to coins of equal value, such that
D. Bag of micetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe dragon and the princess are arguing about what to do on the New Year's Eve. The dragon suggests flying to the mountains to watch
MissileTime Limit: 2 Seconds Memory Limit: 65536 KBYou control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the same time. Before the launching, every missile need T1 seconds
文章目錄 Input Specification:Output Specification:Sample Input:Output for Sample Input: Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of
Calendar GameTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1457 Accepted Submission(s): 812Problem DescriptionAdam and Eve enter this year’s ACM International Collegiate Programming
Sum of divisorsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 82 Accepted Submission(s): 35Problem Descriptionmmm is learning division, she's so proud of herself that she can figure out the