Simple Proof of the Greedy Approach
if column[i] if 0 or 2, we know the value of the 2-row binary matrix for sure, for those remaining column[j] == 1 elements, suppose we have a solution uuullluul
if column[i] if 0 or 2, we know the value of the 2-row binary matrix for sure, for those remaining column[j] == 1 elements, suppose we have a solution `uuullluull...` where `u` denoting the upper j th column element is 1 and `l` denoting the lower j th column element is 1. Since column[j] == 1 is symmetric for `u` and `l` positions, we therefore could arrange `u` and `l` in any order, and there are a total of `count of u` combination out of `count of sum of u and l` solutions. Here is the code to find one of those solutions:\n```python\nclass Solution:\n    def reconstructMatrix(self, upper: int, lower: int, colsum: List[int]) -> List[List[int]]:\n        n = len(colsum)\n        res = [[0]*n for _ in range(2)]\n        for i in range(n):\n            if colsum[i] == 2:\n                res[0][i] = 1\n                res[1][i] = 1\n                upper -= 1\n                lower -= 1\n            elif colsum[i] == 1:\n                if upper > lower:\n                    res[0][i] = 1\n                    upper -= 1\n                else:\n                    res[1][i] = 1\n                    lower -= 1\n        if lower != 0 or upper != 0:\n            return []\n        return res \n```
[]