segment tree
文章平均质量分 75
脳漿炸裂
しょうなんの海--who will be with me next time?
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 1394 Minimum Inversion Number
Thinking: Actually this problem can be solved in a violent way, which is not recommended. Here we made use of segment tree. The basic idea is to save the frequency(actually 0 or 1 for every number) of原创 2016-07-11 23:17:43 · 224 阅读 · 0 评论 -
HDU 2795 Billboard
Thinking: There are 2 tips for this problem. (1) If we use struct , TLE may appear. Instead, I changed to use array maxl[] to store the largest space left in a row in this interval. (2) Since n <=原创 2016-07-12 12:22:23 · 304 阅读 · 0 评论 -
POJ 2828 Buy Tickets
Thinking: About this question, we have to think reversely. We first get all the input and arrange the sequence from the last guy who enters the queue. Because the last guy will not be effected by p原创 2016-07-16 15:22:27 · 359 阅读 · 0 评论
分享