C++ Using Lower Bound | LIS
```\nstatic bool cmp(vector&a,vector&b){\n        if(a[0]!=b[0]) return a[0]b[1];\n    }\n    int maxEnvelopes(vector>& e) {\n        sort(e.begin(),e.end(),cmp
```\nstatic bool cmp(vector<int>&a,vector<int>&b){\n        if(a[0]!=b[0]) return a[0]<b[0];\n        return a[1]>b[1];\n    }\n    int maxEnvelopes(vector<vector<int>>& e) {\n        sort(e.begin(),e.end(),cmp);\n        int n=e.size();\n        vector<int> dp;\n        for(int i=0;i<n;i++){\n           auto it=lower_bound(dp.begin(),dp.end(),e[i][1]);\n            if(it==dp.end()) dp.push_back(e[i][1]);\n            else *it=e[i][1];\n        }\n        return dp.size();\n    }
['C']