dp
静海琉
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVA 12295 Optimal Symmetric Paths
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3716 题目给我们求在n*n的格子图 每个格子有一个值 要求求出从左上角(1,1)到右下角(n,n)花费最小(等于cost min)有几种走法 要求路径必须对称于斜对角线 一个点最多走一次 可以上下左右随原创 2014-03-29 14:38:31 · 539 阅读 · 0 评论 -
uva 12294 - RPG battles
链接 dp 有w1就加 两个状态 能量1-100 w2 1-7 (2^7已近超过100了) #include #include #include using namespace std; #define INF 99999999 #define MIN(a,b) (a>b?b:a) double dp[2][105][15]; int mm[8]; void clear(int原创 2014-03-29 15:22:59 · 956 阅读 · 0 评论 -
zoj 2127 lcis
注释的是我自己写的记录路径 WA 想不通 #include #include #include #include #include #include using namespace std; #define MAX(a,b) (a>b?a:b) typedef long long LL; int dp[555][555]; int a[555],b[555]; int n,m;原创 2014-03-20 20:33:42 · 443 阅读 · 0 评论 -
poj2082
http://poj.org/problem?id=2082 题意蛮难懂的 其实和poj2559(有图示)一样的 碰到很多次了.. #include #define MAX(a,b) (a>b?a:b) struct { int w,h; }a[50005]; struct { int pos,len; }l[50005],r[50005]; int n; void solv原创 2014-03-24 13:17:49 · 752 阅读 · 0 评论
分享