上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页
摘要: 题目链接:http://poj.org/problem?id=2096#include#include#include#includeusing namespace std;const int maxn = 1005;const int INF = 0x3f3f3f3f;double dp[maxn][maxn];int main(){ int n,s; cin>>n>>s; for(int i=n;i>=0;i--) for(int j=s;j>=0;j--) if(i == n && j == s) dp[n][s] = 0,dp[n+1 阅读全文
posted @ 2013-08-28 15:11 等待最好的两个人 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1080#include#include#include#includeusing namespace std;const int maxn = 105;const int INF = 0x3f3f3f;int dp[maxn][maxn];int A[maxn],B[maxn];int mymap[6][6] = { {0, 0, 0, 0, 0, 0}, {0,5,-1,-2,-1,-3 }, {0,-1,5,-3,-2,-4 ... 阅读全文
posted @ 2013-08-28 11:24 等待最好的两个人 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2479#include#include#include#includeusing namespace std;const int maxn = 50005;const int INF = 0x3f3f3f3f;int dp1[maxn];int dp2[maxn];int a[maxn];int N;int main(){ int T; cin>>T; while(T--){ scanf("%d",&N); for(int i=1;i=1;i--){ dp2[i]... 阅读全文
posted @ 2013-08-28 08:51 等待最好的两个人 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1192#include#include#include#include#includeusing namespace std;const int maxn = 1005;const int INF = 0x3f3f3f;int dp[maxn];vector G[maxn];int W[maxn];int N;struct Point{ int x,y;}P[maxn];int ans;void dfs(int u,int fa){ dp[u] = W[u]; for(int i=0;i<G[u].size();... 阅读全文
posted @ 2013-08-27 23:30 等待最好的两个人 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1050#include#include#include#includeusing namespace std;const int maxn = 105;const int INF = 0x3f3f3f;int dp[maxn];int sum[maxn][maxn];int ans;int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int N; cin>>N; for(int i=0;i<=N;i++) sum[0 阅读全文
posted @ 2013-08-27 22:47 等待最好的两个人 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1021#include#include#include#includeusing namespace std;const int maxn = 1>T; for(int cas=1;cas='0' && s[i] <= '9') num[i] = s[i] - '0'; else num[i] = 10 + s[i] - 'A'; } memset(dp,0,sizeof(dp)); ... 阅读全文
posted @ 2013-08-27 11:16 等待最好的两个人 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3254#include #include #include #include #include #include #include using namespace std;const int moder = 1e8;const int maxe = 50000;const int maxn = 13;const int INF = 0x3f3f3f;int dp[maxn][1>M>>N; for(int i=1;i<=M;i++){ G[i] = 0; for(int j=0;j<N;j++)... 阅读全文
posted @ 2013-08-26 22:21 等待最好的两个人 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1018#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 16;const int INF = 0x3f3f3f;int X[maxn],Y[maxn];int S[maxn][maxn];int T,N;int dp[1>T; for(int cas=1;cas<=T;cas++ 阅读全文
posted @ 2013-08-26 19:30 等待最好的两个人 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1017#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 105;const int INF = 0x3f3f3f;int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int Y[maxn]; i 阅读全文
posted @ 2013-08-26 14:02 等待最好的两个人 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4597#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 26;const int INF = 0x3f3f3f;int dp[maxn][maxn][maxn][maxn]; //dp[l1][r1][l2][r2] 表示先手与后手取得到的最大差值。bool vis[maxn][maxn][maxn][.. 阅读全文
posted @ 2013-08-25 08:40 等待最好的两个人 阅读(279) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页