摘要:
hdu 4374 One hundred layer http://acm.hdu.edu.cn/showproblem.php?pid=4374 2012-12-3dp[i][j]=max{ max{dp[i-1][k]+sum[j]-sum[k-1]} (j-t<=k<=j), max{dp[i-1][k]+sum[k]-sum[j-1]} (j<=k<=j+k) }View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 using n
阅读全文
posted @ 2012-11-24 19:45
Qiuqiqiu
阅读(156)
推荐(0)
编辑
摘要:
hdu 2120 Ice_cream's world I http://acm.hdu.edu.cn/showproblem.php?pid=2120 2012-12-22并查集算环的个数View Code 1 #include <cstdio> 2 using namespace std; 3 4 const int N=1010; 5 int fa[N]; 6 int find(int x) 7 { 8 return x==fa[x]?x:fa[x]=find(fa[x]); 9 }10 int main()11 {12 int n,m;13 while(...
阅读全文
posted @ 2012-11-24 11:50
Qiuqiqiu
阅读(111)
推荐(0)
编辑