2012年7月19日
摘要:
http://poj.org/problem?id=1925蜘蛛侠要从最左荡到最右荡的过程中不能着地 问最少荡多少次荡点 在荡的过程中高度不变要以 荡点(0...1000000)找最小答案进行更新代码及其注释:#include<iostream>#include<stdio.h>#include<string.h>#include<queue>#include<cmath>#include<stack>#include<algorithm>using namespace std;const int N=5005 阅读全文
posted @ 2012-07-19 20:55
夜->
阅读(170)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=2948矩阵中每个点都有 只能向north和向west传递的两种矿 二者不可兼得传到最north 和最 west 的矿才可获得 求最大DP 递推代码:#include<iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;const int N=505;int tonorth[N][N];int towest[N][N];int sum[N][N];int main(){ int n, 阅读全文
posted @ 2012-07-19 10:51
夜->
阅读(172)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=2029给个大矩阵 上面有一些点再给个小矩阵 问小矩阵最大可以包含多少个点代码:#include<iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;const int N=105;int a[N][N];int b[N][N];//x范围仅为1 y范围为 h 的和int sum[N][N];//x范围为w y范围为 h 的和int main(){ int n; int W,H; i 阅读全文
posted @ 2012-07-19 09:15
夜->
阅读(194)
评论(0)
推荐(0)
浙公网安备 33010602011771号