poj1083】的更多相关文章

POJ1083 Moving Tables Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 35297   Accepted: 11774 Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor…
2017-09-02 19:49:59 writer:pprp 题意说明: 比较简单的题,一开始被吓到了,后来才发现,其实可以用很简单的方法就可以解决: 就是在这样的房间中如果在i 和 j 中之后的10分钟内就不可以经过别的路线的桌子,给你几组数据问你最短时间搬完这些桌子: 分析: 其实不是很难,不要往线段树之类的数据结构去考了,这就是一个简单题, 直接遍历(a-1)/2 到 (b-1)/2就可以了,开一个200的数组,进行操作就OK了 代码如下·: /* @theme:poj1083 @wri…
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its…
Moving Tables Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28304   Accepted: 9446 Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200…
K - 简单dp Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in…
http://poj.org/problem?id=1083 Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.  The floor has 200 rooms each on the north side and south side along the corridor. Re…
题意:南北两侧各有200个房间,两侧房间之间有一个走廊 现在需要把桌子从这400个房间之中搬进搬出,每一张桌子需要10分钟时间,如果走廊因为有桌子搬运而占用,则需等待,求共需多少时间(分钟)将桌子搬完 分析:由于走廊跨越200个房间,设置数组大小为200的数组,如从x出发搬到y,则把x到y的走廊全部+10,最后求该数组最大值,便是结果 原因:若从x出发到y,中间有桌子也需要搬运,则冲突的路段势必会耽误10分钟时间,耽误时间的最大值便是结果(只要不冲突,同一时间可以搬运多张桌子) import j…
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its…
BUPT2017 wintertraining(15) #6E 题意 房间1和2,3和4,...,399和400共用一节走廊,有q次从房间li到ri的搬运桌子,一次搬运10分钟.两个搬运如果走廊有重叠部分,则必须一个结束后再执行另一个.求全部搬运所需最少的时间. 题解 对于一次搬运,我们可以求出它经过的走廊区间,给这些区间的每节走廊的经过次数都++.最少的总时间就是最大经过次数*10. 这题贪心为什么不对呢?贪心的方法是根据区间右端点排序,右端点相同再按左端点排序.然后如果当前的左端点小于前一个…
题目链接:http://poj.org/problem?id=1083 如图所示在一条走廊的两侧各有200个房间,现在给定一些成对的房间相互交换桌子,但是走廊每次只能通过一组搬运, 也就是说如果两个搬运过程有交叉是不能同时搬运的,要依次来,一次搬运10min,问完成所有的搬运的最少用时.   思路:将每个左右相邻房间的走廊作为一个统计单位,当所有的办公桌都搬运完成后,检查每个走廊对应的统计单位被占用多少次. 统计所有的左右相邻房间的走廊被占用的最大次数,就是单独安排的搬运次数,乘以10就是总的搬…