BYRBT
摘要: 题目:http://www.tyvj.cn/Problem_Show.asp?id=1064 TYVJ格式问题,这里不贴题了。题解: 一道非常不错的DP~~~~~~ f[i]=min(f[j]+(i-j)*v*get(j+1,i)+k)(0<=j<i),用f[i]表示到第i天的最小费用为多少,则转移方程表示在第j+1天到第i天方案不变的费用。get(a,b)表示从第a天到第b天方案保持不变最小需要多少人,这个问题可以先排除不可用边后求最小生成树得到所需的值。枚举i,j,每次再做一次做小生成树,最终复杂度可以变为O(n*n*m)(在一开始时排一次序即可不用每次对选出的边排序,当然是用 阅读全文
posted @ 2012-07-09 19:09 zhonghaoxi 阅读(238) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=H4mXhbyi4yi&S=milk6http://www.nocow.cn/index.php/Translate:USACO/milk6Pollutant ControlHal BurchIt's your first day in Quality Control at Merry Milk Makers, and already there's been a catastrophe: a shipment of bad milk has been sent out. Unfortunatel 阅读全文
posted @ 2012-07-02 21:29 zhonghaoxi 阅读(295) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=JsPN70PkuJW&S=rectbarnhttp://pingce.ayyz.cn:9000/usaco/data/20110129214306/rectbarn.htmlA Rectangular BarnMircea Pasoi -- 2003Ever the capitalist, Farmer John wants to extend his milking business by purchasing more cows. He needs space to build a new barn for 阅读全文
posted @ 2012-07-01 19:10 zhonghaoxi 阅读(225) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=GPizy6nCKUy&S=fence3http://pingce.ayyz.cn:9000/usaco/data/20110129214306/fence3.htmlElectric FencesKolstad & SchrijversFarmer John has decided to construct electric fences. He has fenced his fields into a number of bizarre shapes and now must find the opt 阅读全文
posted @ 2012-06-30 22:38 zhonghaoxi 阅读(498) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=0H14tt2CoyP&S=tourhttp://pingce.ayyz.cn:9000/usaco/data/20110129214306/tour.htmlCanada TourYou have won a contest sponsored by an airline. The prize is a ticket to travel around Canada, beginning in the most western point served by this airline, then travelin 阅读全文
posted @ 2012-06-29 22:46 zhonghaoxi 阅读(233) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=0H14tt2CoyP&S=prime3http://pingce.ayyz.cn:9000/usaco/data/20110129214306/index.html#Section_5.1The PrimesIOI'94In the square below, each row, each column and the two diagonals can be read as a five digit prime number. The rows are read from left to right. 阅读全文
posted @ 2012-06-29 22:39 zhonghaoxi 阅读(598) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=0H14tt2CoyP&S=cryptcowhttp://pingce.ayyz.cn:9000/usaco/data/20110129214306/index.html#Section_5.1CryptcowgraphyBrian DeanThe cows of Farmer Brown and Farmer John are planning a coordinated escape from their respective farms and have devised a method of encryp 阅读全文
posted @ 2012-06-29 22:26 zhonghaoxi 阅读(396) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=m0gi84wTGvp&S=fence8http://pingce.ayyz.cn:9000/usaco/data/20110129214306/fence8.htmlFence RailsBurch, Kolstad, and SchrijversFarmer John is trying to erect a fence around part of his field. He has decided on the shape of the fence and has even already install 阅读全文
posted @ 2012-05-26 21:53 zhonghaoxi 阅读(481) 评论(0) 推荐(1) 编辑
摘要: 题目:http://ace.delos.com/usacoprob2?a=hgHbW0wyBLd&S=fence4http://www.nocow.cn/index.php/Translate:USACO/fence4Closed FencesA closed fence in the plane is a set of non-crossing, connected line segments with N corners (3 < N < 200). The corners or vertices are each distinct and are listed in 阅读全文
posted @ 2012-05-26 13:10 zhonghaoxi 阅读(247) 评论(0) 推荐(1) 编辑
摘要: 题目:http://cdqz.openjudge.cn/noip/1012/时间限制:20000ms内存限制:128000kB描述阿兰是某机密部门的打字员,她现在接到一个任务:需要在一天之内输入几百个长度同定为6的密码。当然,她希望输入的过程中敲击键盘的总次数越少越好..不幸的是,出于保密的需要,该部门用于输入密码的键盘是特殊设计的,键盘上没有数字键,而只有以下六个键:Swap0.Swapl,up,down,Left,Right。为了说明这6个键的作用,我们先定义录入区的6个位置的编号,从左至右依次为l,2,3,4,5,6。下面列出每个键的作用:Swap0:按Swap0,光标位置不变,将光标所 阅读全文
posted @ 2012-05-25 19:08 zhonghaoxi 阅读(384) 评论(0) 推荐(2) 编辑
BYRBT