#define SZ(x) (int)(x.size())
const int inf = 0x3f3f3f3f;
string s = "ab##C##";
struct Node {
int val;
int l,r;
Node() {
val = inf;
}
}t[100010];
void built(int i) {
if (idx < SZ(s)) {
if (s[idx] == '#') {
idx++;
return;
}
t[i].val = idx++;
t[i].l = 2 * i;
t[i].r = 2 * i + 1;
built(2 * i);
built(2 * i + 1);
}
}
标签:idx,val,建立,静态,int,二叉树,inf,built
From: https://www.cnblogs.com/FanWQ/p/16834203.html