有根树同构。参考论文《hash在。。。。》

1 #include <iostream> 2 #include <fstream> 3 #include <algorithm> 4 #include <cstring> 5 #include <climits> 6 #include <cmath> 7 8 using namespace std; 9 10 const int leaf_hash=2099; 11 const int pt=9323; 12 const int qt=8719; 13 char str1[3100], str2[3100]; 14 char *p; 15 16 int Hash() 17 { 18 int sum=1; 19 if(*(p)=='1'&&*(p-1)=='0'){ 20 p++; 21 //cout<<"leaf_hash="<<endl; 22 return leaf_hash; 23 } 24 while(*p!='