[Python] Greedy Solution
\nclass Solution:\n    def reconstructMatrix(self, upper: int, lower: int, colsum: List[int]) -> List[List[int]]:\n        res = [[0]*len(colsum),[0]*len(colsum
```\nclass Solution:\n    def reconstructMatrix(self, upper: int, lower: int, colsum: List[int]) -> List[List[int]]:\n        res = [[0]*len(colsum),[0]*len(colsum)]\n        \n        for i in range(len(colsum)):\n            if colsum[i] <= upper:\n                res[0][i] = colsum[i]\n                upper -= colsum[i]\n                colsum[i] = 0\n            \n            elif colsum[i] <= upper+lower:\n                res[0][i] = upper\n                colsum[i] -= upper\n                upper = 0\n                \n                res[1][i] = colsum[i]\n                lower -= colsum[i]\n                colsum[i] = 0\n                \n            else:\n                return []\n            \n        return res if upper+lower == 0 else []\n```
[]