Ad

There is a tree.
We define "cut the branch" as deleting one of its non-leaf nodes and making its sons its equal.
A root can also be deleted to form 2 seperate trees.
An example:
1->2, 2->3, 2->4
after deleting 2:
1->3, 1->4
after deleting 1:
3, 4(two seperate trees)

Your job is to decide the maximal amouts of trees you get when there are not any branches left for you to cut.

The input will be like this:
vector1 1 2 2
| | |
/ / /
vector2 2 3 4

#include <vector>
using namespace std;

int CutTheBranch(vector<int> fir, vector<int> sec){
  int thing[20005];
  for(int i=0;i<20005;i++)thing[i]=0;
  int k=sec.size();
  for(int i=0;i<k;i++)thing[fir[i]]++;
  int cnt=0;
  for(int i=0;i<20005;i++)if(thing[i]!=0)cnt++;
  return cnt;
}

output "another value".

#include <iostream>
#include <string>
int voice(){
  std::string a,b;
  std::cin>>a>>b;
  std::cout<<"another value";
  return 0;
}