题意:
一颗树,然后两个操作,一是删除一条边,二是移除不与根相连的部分。
思路:
树上博弈的基础题目。
code:
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+5;
std::vector<int> v[N];
int dfs(int u,int p){
int ans=0;
for (
题意:
一颗树,然后两个操作,一是删除一条边,二是移除不与根相连的部分。
思路:
树上博弈的基础题目。
code:
#include <bits/stdc++.h>
using namespace std;
const int N=1e5+5;
std::vector<int> v[N];
int dfs(int u,int p){
int ans=0;
for (