题目描述 某大学有N个职员,编号为1~N.他们之间有从属关系,也就是说他们的关系就像一棵以校长为根的树,父结点就是子结点的直接上司.现在有个周年庆宴会,宴会每邀请来一个职员都会增加一定的快乐指数Ri,但是呢,如果某个职员的上司来参加舞会了,那么这个职员就无论如何也不肯来参加舞会了.所以,请你编程计算,邀请哪些职员可以使快乐指数最大,求最大的快乐指数. 输入输出格式 输入格式: 第一行一个整数N.(1<=N<=6000) 接下来N行,第i+1行表示i号职员的快乐指数Ri.(-128<=Ri…
POJ 2342 Anniversary party / HDU 1520 Anniversary party / URAL 1039 Anniversary party(树型动态规划) Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of emp…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1520 Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16376    Accepted Submission(s): 6241 Problem Description There is going to…
Time limit :1000 ms :Memory limit :32768 kB: OS :Windows There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation for…
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6058    Accepted Submission(s): 2743 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State Univers…
Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical…
Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6078    Accepted Submission(s): 2752 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the…
Anniversary party Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6926   Accepted: 3985 Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure…
Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12770    Accepted Submission(s): 5142 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the…
Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation forms a tree rooted at the rector V. E.…