MY*****

2011年1月22日

poj 2777 ——线段树基础

摘要: Count ColorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 16872Accepted: 4839DescriptionChosen 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 is a very long board with length L centimeter, L is a 阅读全文

posted @ 2011-01-22 18:15 reflec94 阅读(1488) 评论(1) 推荐(1) 编辑

poj3468 A Simple Problem with Integers——线段树的应用

摘要: A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:16883Accepted:4349Case 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 interva 阅读全文

posted @ 2011-01-22 18:06 reflec94 阅读(426) 评论(0) 推荐(0) 编辑

NOI2004 郁闷的出纳税——SBT应用

摘要: 【问题描述】OIER公司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务之一便是统计每位员工的工资。这本来是一份不错的工作,但是令人郁闷的是,我们的老板反复无常,经常调整员工的工资。如果他心情好,就可能把每位员工的工资加上一个相同的量。反之,如果心情不好,就可能把他们的工资扣除一个相同的量。我真不知道除了调工资他还做什么其它事情。工资的频繁调整很让员工反感,尤其是集体扣除工资的时候,一旦某位员工发现自己的工资已经低于了合同规定的工资下界,他就会立刻气愤地离开公司,并且再也不会回来了。每位员工的工资下界都是统一规定的。每当一个人离开公司,我就要从电脑中把他的工资档案删去,同 阅读全文

posted @ 2011-01-22 17:53 reflec94 阅读(277) 评论(0) 推荐(0) 编辑

CQF平衡树——SBT论文——Size Balanced Tree

摘要: Size Balanced TreeSize Balanced Tree(SBT)是一种平衡二叉查找树。它的论文由中国广东中山纪念中学的陈启峰于2006年底完成,并在Winter Camp 2007中发表。由于SBT的拼写很容易找到中文谐音,它常被中国的OIer们戏称为“傻X树”、“Super BT”等。但它的性能并不SB,编写起来也并不BT。恰恰相反,SBT易于实现,且据陈启峰论文中所言,“这是目前为止速度最快的高级二叉搜索树”。它能在O(logn)的时间内完成所有BST的相关操作。而且由于SBT赖以保持平衡的是Size域而不是其他“无用”的域,它可以很方便地实现动态顺序统计中的select 阅读全文

posted @ 2011-01-22 17:46 reflec94 阅读(1966) 评论(2) 推荐(0) 编辑

SBT的应用——求区间第k值——poj2761

摘要: Feed the dogsTime Limit:6000MSMemory Limit:65536KTotal Submissions:5092Accepted:1348Description Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not the dogs, so Jiajia use a special way to feed the dogs. At lunchtime 阅读全文

posted @ 2011-01-22 17:40 reflec94 阅读(620) 评论(0) 推荐(0) 编辑

导航