uva 11400 Problem F Lighting System Design】的更多相关文章

紫皮书题: 题意:让你设计照明系统,给你n种灯泡,每种灯泡有所需电压,电源,每个灯泡的费用,以及每个灯泡所需的数量.每种灯泡所需的电源都是不同的,其中电压大的灯泡可以替换电压小的灯泡,要求求出最小费用 题解:每种电压灯泡要么全换,要么全不换,因为只换部分还要加额外的电源费用,并且换了部分之后费用更少,不如全换 先把灯泡按照电压从小到大排序,这样进行dp时,后面的电压大的如果比电压小的更优的话就可以替换了 设dp[j]为前j个最优了,则dp[i] = min{dp[i],dp[j] + (s[i]…
Problem F Lighting System Design Input: Standard Input Output: Standard Output You are given the task to design a lighting system for a huge conference hall. After doing a lot of calculation & sketching, you have figured out the requirements for an e…
Problem F. Fibonacci SystemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86821#problem/B Description Little John studies numeral systems. After learning all about fixed-base systems, he became inte…
意甲冠军  地方照明系统设计  总共需要n不同类型的灯泡  然后进入 每个灯电压v  相应电压电源的价格k  每一个灯泡的价格c   须要这样的灯泡的数量l   电压低的灯泡能够用电压高的灯泡替换   每种灯泡仅仅须要一个相应的电源   求完毕这个照明系统的最少花费 比較简单的DP  easy知道 当要替换一种灯泡中的一个到令一种电压较高的灯泡时  仅仅有所有替换这样的灯泡为还有一种时才可能使总花费变小   所有替换掉就省下了这样的灯泡的电源花费   先把灯泡依照电压排序   那么每种灯泡都能够…
题文: You are given the task to design a lighting system for a huge conference hall. After doing a lot of calculation and sketching, you have figured out the requirements for an energy-efficient design that can properly illuminate the entire hall. Acco…
You are given the task to design a lighting system for a huge conference hall. After doing a lot of calculation and sketching, you have figured out the requirements for an energy-efficient design that can properly illuminate the entire hall. According t…
You are given the task to design a lighting system for a huge conference hall. After doing a lot of calculation and sketching, you have figured out the requirements for an energy-efficient design that can properly illuminate the entire hall. According t…
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2395 题意: 有n(n≤1000)种灯泡,不同种类的灯泡必须用不同的电源,但同一种灯泡可以共用一个电源.每种灯泡用4个数值表示:电压值V(V≤132000),电源费用K(K≤1000),灯泡单价C(C≤10)和所需数量L(1≤L≤100).可以把一些灯泡换成电压更高的另一种灯泡以节…
[Link]: [Description] 你要构建一个供电系统; 给你n种灯泡来构建这么一个系统; 每种灯泡有4个参数 1.灯泡的工作电压 2.灯泡的所需的电源的花费(只要买一个电源就能供这种灯泡的所有灯泡使用); 3.灯泡的单个价格 4.灯泡的所需个数; 现在,你可以把某一些灯泡换成另外一种灯泡电压要严格更高; 然后所需的灯泡个数不变,其他的都变成另外一种电压的属性; 问你最少需要花费多少钱构建这么一个供电系统; (即买电源的钱+买灯泡的钱) [Solution] 把所有的灯泡,按照电压的大…
题意: 一共有n种灯泡,不同种类的灯泡必须用不同种电源,但同一种灯泡可以用同一种电源.每种灯泡有四个参数: 电压值V.电源费用K.每个灯泡的费用C.所需该种灯泡的数量L 为了省钱,可以用电压高的灯泡来代替电压低的灯泡.输出最小费用. 分析: 每种电源的灯泡要么不换要么全换,因为只换部分的话,两种类型的电源都要买,不划算. 将电压从小到大排序,s[i]表示前i种灯泡一共需要多少个灯泡,d[i]表示前i种灯泡最少费用. d[i] = min{d[j] + (s[i] - s[j]) * c[i] +…