
poj
zhaorongxia
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 3468 A Simple Problem with Integers
数据量比较大,所以要用线段树处理!!在加以个数后,不要把父结点的所有子结点都加上,这要比较费时间,用一个nsum存储,在寻找区间段的和时,按需要往下加!!另外数据位数比较大,超过了32位,用int类型肯定不行,要用__int64!!具体看代码的注释!!DescriptionYou have N integers, A1, A2, ... ,AN. You need to dea原创 2012-08-11 16:32:17 · 394 阅读 · 0 评论 -
poj 3264 Balanced Lineup
这道题用线段树做,记录不同区间的的最大最小值,在搜索时从大区间开始搜索,具体看代码的注释!DescriptionFor 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原创 2012-08-11 14:35:54 · 336 阅读 · 0 评论 -
poj 1274
用二分图做,把牛看作一个集合,把牛棚看作另一个集合,求最大产奶量就是求最大匹配数!!!DescriptionFarmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering proble原创 2012-08-14 15:16:01 · 467 阅读 · 0 评论