2012年5月5日
摘要: http://poj.org/problem?id=3661二维DP#include<iostream>#include<cstring>#include<string>#include<cmath>#include<cstdio>using namespace std;const int N=10005;const int M=505;int L[N];int rest[N][M];int norest[N][M];int main(){ int n,m; while(scanf("%d %d",&n,& 阅读全文
posted @ 2012-05-05 20:16 夜-> 阅读(132) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3660此题不是最短路 但可以用到 floydA牛可以打败B牛 B牛可以打败C牛 那么A牛一定可以打败C牛讲这个关系进行传递每一头牛打败别的牛(i头)和被别的牛打败(j头)的和(i+j)必须是n-1 才能确定其排名#include<iostream>#include<cstring>#include<string>#include<cmath>#include<cstdio>using namespace std;const int N=105;bool beat[N][N];int 阅读全文
posted @ 2012-05-05 19:03 夜-> 阅读(159) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示