codeforces round 627 div3 [树上dp]F. Maximum White Subtree
#include<iostream>#include<vector>#define pb push_back using namespace std;const int N = 2e5 + 5;vector<int> g[N];int dp[N],a[N];const int INF = 0x3f3f3f3f;int dfs(int u,int pre){ int ans = (a[u] == 1)?1 : -1; for(unsigned in.
原创
2020-10-15 10:31:02 ·
82 阅读 ·
0 评论