2013年6月28日

hdoj 1176 免费馅饼

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1176解题思路:核心为 dp[x][T]=dp[x][T]+max(dp[x-1][T+1],dp[x][T+1],dp[x+1][T+1]), 其中 1≤x≤11, 0≤T 2 #include 3 using namespace std; 4 5 int dp[15][100005]; 6 7 int max(int x,int y,int z){ 8 if(y>x) x=y; 9 if(z>x) x=z;10 return x;11 }12 13 int main(... 阅读全文

posted @ 2013-06-28 13:21 SCNU20102200088 阅读(194) 评论(0) 推荐(0) 编辑

导航