andre_joy

导航

2012年7月27日

hdu 1494

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1494题意:中文……mark:dp[i][j]代表第i个时间段,有j数量的油,油的数量0~14.代码:#include <stdio.h>#include <string.h>#define N 0x3f3f3f3fint dp[2][15];int a[110][2];int min(int a, int b) {return a < b ? a : b;}int main(){ int l,n,min1; int i,j; while(~scanf("%d%d 阅读全文

posted @ 2012-07-27 22:07 andre_joy 阅读(157) 评论(0) 推荐(0) 编辑

hdu 1300

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1300题意:买珠宝。每种品种必须加上10个同等级珠宝的价钱,可以将低品种的并入高品种,这样可能可以减少价钱。求最小价钱。mark:dp。刚开始思路是小品种的往大品种上加,直到加不了。然后大部分数据可以过,不过显然是wa的。后来看解题报告用新思路做,数据设小了。。wa了。代码:#include <stdio.h>int min(int a, int b) {return a < b ? a : b;}int main(){ int dp[110], a[110][2]; int t, n 阅读全文

posted @ 2012-07-27 15:15 andre_joy 阅读(185) 评论(0) 推荐(0) 编辑