add sameTree in c++