#include<cstdio> #include<vector> #include<cstring> #include<iostream> using namespace std; ; vector<int>a[MAXN]; int n,m,v[MAXN],vis[MAXN],dp[MAXN][MAXN]; void dfs(int root) { dp[root][] = v[root]; vis[root] = ; int i, len =…
1017: [JSOI2008]魔兽地图DotR Time Limit: 30 Sec Memory Limit: 162 MBSubmit: 1566 Solved: 705[Submit][Status][Discuss] Description DotR (Defense of the Robots) Allstars是一个风靡全球的魔兽地图,他的规则简单与同样流行的地图DotA(Defense of the Ancients) Allstars.DotR里面的英雄只有一个属性——力量…
TELE Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3675 Accepted: 1936 Description A TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tre…
题目链接 选课 题解 基础背包树形dp #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #define LL long long int #define Redge(u) for (int k = h[u],to; k; k = ed[k].nxt) #define REP(i,n) for (int i = 1;…