#include #include using namespace std; struct Node{ int nodeId; int childNum; Node(){ nodeId=0; childNum=0; }; void SetNode(int id){ nodeId=id; } }; int main(int argc, char* argv[]) { int N,i; cin>>N; vector myNode(N); int A,B; for (i=0;i>A>>B; myNode[A-1].childNum++; myNode[B-1].childNum++; } int Num=0; for (i=0;i2){ Num+=myNode[i].childNum-2; myNode[i].childNum=2; } } cout<