文章
15
粉丝
0
获赞
62
访问
3.6k
#include<bits/stdc++.h>
using namespace std;
typedef struct node{
char data;
struct node *lchild, *rchild;
}*BitTree;
bool isSym(BitTree left, BitTree right){
if(left == NULL && right == NULL) return true;
if(left == NULL || right == NULL) return false;
return isSym(left -> lchild, right -> rchild) && isSym(left -> rchild, right -> lchild);
}
int main(){
string s;
while(cin >> s){
if(s.empty() || s[0] == '#'){
cout << "YES" << endl;
continue;
}
int n = s.length();
BitTree root = new node();
...
登录后发布评论
暂无评论,来抢沙发