
树形DP
文章平均质量分 86
cq_phqg
心中的坚持与不懈的努力,梦想就在前方!
展开
-
UVALive 6712(2013长春区域赛)
Three countries, Red, Yellow, and Blue are in war. The map of battlefield is a tree, which means thatthere are N nodes and (N −1) edges that connect all the nodes. Each country has a base station loc原创 2014-08-02 21:45:31 · 726 阅读 · 0 评论 -
2014多校1(1003)hdu4863
#include //树形dp,好题#include #include #include using namespace std;#define INF ((1<<31)-1)#define mod 10007int n,d;int head[210];int next[210<<1];int edge[210<<1];int num[210];原创 2014-08-02 20:10:46 · 897 阅读 · 1 评论 -
2014多校5(1006)hdu4916(树形DP)
Count on the pathTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 255 Accepted Submission(s): 59Problem Descriptionbobo has原创 2014-08-06 16:42:30 · 728 阅读 · 0 评论 -
2014多校5(1002)hdu4912(贪心+LCA)
#include #include #include #include #include #pragma comment(linker, "/STACK:16777216")using namespace std;#define maxn 100010int m,n;int head[maxn];int edge[maxn<<1];int next[原创 2014-08-06 16:53:01 · 731 阅读 · 0 评论 -
Codeforces Round #263 (Div. 2)D(树形DP)
D. Appleman and Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAppleman has a tree with n vertices. S原创 2014-08-27 15:55:18 · 1184 阅读 · 1 评论 -
Codeforces Round #277 (Div. 2)D(树形DP计数类)
D. Valid Setstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, an undirected connected graph wit原创 2014-11-12 11:06:35 · 1373 阅读 · 0 评论 -
ASC(1)C(树形DP)
New Year Bonus GrantSpecial JudgeTime Limit: 6000/3000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)SubmitStatisticNext ProblemProblem Description All programmers原创 2014-10-02 01:07:04 · 869 阅读 · 0 评论 -
Codeforces Round #275 (Div. 1)D(树形DP)
D. Random Function and Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a rooted tree consistin原创 2014-11-13 16:40:18 · 983 阅读 · 0 评论