Python - first remove 2, then remove ones arbitrarily
First remove sum==2s since we do not have a choice there.\nThen we can arbitrarily choose either upper or lower when sum==1.\nMake sure do some check such as up
First remove sum==2s since we do not have a choice there.\nThen we can arbitrarily choose either upper or lower when sum==1.\nMake sure do some check such as upper + lower == sum(colsum)\n```\ndef reconstructMatrix(self, upper: int, lower: int, colsum: List[int]) -> List[List[int]]:\n        if sum(colsum) != upper + lower: return []\n        m, n = len(colsum), 2\n        ans = [[0] * m for _ in range(n)]\n        for i in range(m):\n            if colsum[i] == 2:\n                if upper > 0 and lower > 0:\n                    upper -= 1\n                    lower -= 1\n                    ans[0][i] = 1\n                    ans[1][i] = 1\n                else:\n                    return []\n        \n        for i in range(m):\n            if colsum[i] == 1 and upper > 0:\n                ans[0][i] = 1\n                upper -= 1\n\n        for i in range(m):\n            if colsum[i] == 1 and ans[0][i] == 0 and lower > 0:\n                ans[1][i] = 1\n                lower -= 1\n        \n        return ans\n```
[]