摘要:一开始想到的办法,对每个序列建立二叉排序树后先根遍历看得到的序列是否相同即可。打完后忽然想到,其实既然我用数组存下了二叉树,那么直接比较树是否完全一样就可以了的,算了就这样吧,以后再打……/* * hdu3791/linux.cpp * Created on: 2011-9-6 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>using namespace std;type
阅读全文