随笔分类 -  2012暑期培训--acm--线段树

POJ 2777 Count Color 数颜色, 学长说可以用30位二进制来记录颜色,可是我用的是数组来统计,因为30小,所以数组速度还不错
摘要:D - Count ColorCrawling in process... Crawling failed Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionChosen 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 i 阅读全文

posted @ 2012-07-26 10:35 wpdxzabm 阅读(173) 评论(0) 推荐(0)

HDU 1166 敌兵布阵 线段树,树状数组都可以,本人认为树状数组维护可以快些
摘要:A - 敌兵布阵Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增 阅读全文

posted @ 2012-07-26 10:32 wpdxzabm 阅读(117) 评论(0) 推荐(0)

POJ 3667 Hotel
摘要:E - HotelCrawling in process... Crawling failed Time Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionThe 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 阅读全文

posted @ 2012-07-26 10:29 wpdxzabm 阅读(92) 评论(0) 推荐(0)

线段树
摘要:nlogn的时间维护,logn的时间查询单个元素 sum可以是包括下面的元素 或者当查询的时候才去得到结果 阅读全文

posted @ 2012-07-25 11:03 wpdxzabm 阅读(86) 评论(0) 推荐(0)

导航