正文
增加 5 行删除 5 行
60 行未改动6162636465666768697071727374757677787980818283848586878824 行未改动60 行未改动return;}if (t[u].l) dfs(t[u].l);if (t[u].r) dfs(t[u].r);dep[u] = max(dep[t[u].l], dep[t[u].r]) + 1;if (tp[t[u].l] == 3 || tp[t[u].r] == 3 || dep[t[u].l] > dep[t[u].r] + 1) {tp[u] = 3;return;}if (dep[t[u].l] < dep[t[u].r]) {tp[u] = 3;return;}if (dep[t[u].l] == dep[t[u].r]) {if (tp[t[u].l] == 1 && tp[t[u].r] == 1) tp[u] = 1;else if (tp[t[u].l] == 1 && tp[t[u].r] == 2) tp[u] = 2;else tp[u] = 3;return;}if (dep[t[u].l] == dep[t[u].r] + 1) {if (tp[t[u].r] == 1) tp[u] = 2;else tp[u] = 3;return;24 行未改动60 行未改动6162636465666768697071727374757677787980818283848586878824 行未改动60 行未改动return;}if (t[u].l) dfs(t[u].l);if (t[u].r) dfs(t[u].r);dep[u] = max(dep[t[u].l], dep[t[u].r]) + 1;if (tp[t[u].l] == 3 || tp[t[u].r] == 3 || dep[t[u].l] > dep[t[u].r] + 1) {tp[u] = 3;return;}if (dep[t[u].l] < dep[t[u].r]) {tp[u] = 3;return;}if (dep[t[u].l] == dep[t[u].r]) {if (tp[t[u].l] == 1 && tp[t[u].r] == 1) tp[u] = 1;else if (tp[t[u].l] == 1 && tp[t[u].r] == 2) tp[u] = 2;else tp[u] = 3;return;}if (dep[t[u].l] == dep[t[u].r] + 1) {if (tp[t[u].r] == 1) tp[u] = 2;else tp[u] = 3;return;24 行未改动