Description Solution 前置知识:最长上升子序列O(nlogn)的贪心做法, dfs序分析:从题目中可以得出,根 < 右子树 < 左子树,如果要选择最多的点,那么如果能够处理出根 -> 右子树 -> 左子树的dfs序,在序列上取一个最长上升子序列,就能选到最多的点,于是长度即为答案。时间复杂度:O(nlogn) Code #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 5; typedef long long ll; int w[N], seq[N], t...