Anniversary party Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6271 Accepted Submission(s): 2820 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the…
Anniversary party Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6990 Accepted Submission(s): 3104 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the…
题目链接:http://poj.org/problem?id=2342 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…
题目链接: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): 12366 Accepted Submission(s): 5009 Problem Description There is going to…
Anniversary party Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3623 Accepted Submission(s): 1684 Problem Description There is going to be a party to celebrate the 80-th Anniversary of the…
第二道树形DP,先是MLE.后来仅需改小邻接矩阵的第二个维度到30就过了. #include <cstdio> #include <cstring> #include <cstdlib> #define MAXN 6005 int rat[MAXN]; ]; ]; bool visit[MAXN]; int n; int max(int a, int b) { return a>b ? a:b; } void dfs(int r) { int i, v; visi…