Python 5 lines short code
python\nclass Solution:\n    def maxEnvelopes(self, es):\n        es.sort(key=lambda x: (x[0], -x[1]))\n        heights = [0x3f3f3f3f] * len(es)\n        for _,
```python\nclass Solution:\n    def maxEnvelopes(self, es):\n        es.sort(key=lambda x: (x[0], -x[1]))\n        heights = [0x3f3f3f3f] * len(es)\n        for _, h in es:\n            heights[bisect.bisect_left(heights, h)] = h\n        return bisect.bisect_right(heights, 0x3f3f3f3f - 1)\n\n```
[]