摘要: 题目链接: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://poj.org/problem?id=2127 #include#include#include#includeusing namespace std;const int maxn = 510;int dp[maxn][maxn];int a[maxn],b[maxn];pair > Max[maxn];pair pre[maxn][maxn];void print(int x,int y){ if(x>0 && y>0 && dp[x][y] > 0){ print(pre[x][y].first,pre[x][ 阅读全文
posted @ 2013-08-27 19:54 等待最好的两个人 阅读(128) 评论(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) 编辑