摘要:
简单树形DP,父节点要么去要么不去;res[i]=max(∑res[child[i]],∑res[child(child[i])]);#include<iostream>#include<cstdio>#include<cstring>using namespace std;struct node{ int i,next;}vert[201];char name[201][20];int head[201],res[201],go[201],nogo[201],N,count;int find(char * str){ int i; for(i=1;i< 阅读全文
posted @ 2012-06-09 10:32
书山有路,学海无涯
阅读(329)
评论(0)
推荐(0)
浙公网安备 33010602011771号