#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
char s[N];
bool judge(char c){ //判断是不是数字
return c>='0'&&c<='9';
}
struct node{
char c;
int num;
node* left;
node* right;
};
typedef node* tree;
tree build(int l,int r){ //建树
tree p=new node;
p->c='#';
p->left=NULL;
p->right=NULL;
int a=0;
int i;
bool flag=false;
while(l<r&&s[l]=='('&&s[r]==')') l++,r--;//略去无意义括号
vector<int> v;//存储*/符号下标
for(i=l;i<=r;i++){
if(!judge(s[i])&&s[i]!='('&&s[i]!=')'&&a==0){ //括号外是符号且不是括号
if(s[i]=='+'||s[i]=='-'){ //是+或-,则以它为父节点,建左右子树
flag=true;
p->c=s[i];
p->left=build