python3 greedy with explanation
1.If the sum of columns isn\'t equal to upper + lower: return []\n2.Since column sum 0 means the 2 rows are 0 and sum 2 mean the 2 rows are 2, we can add these 
1.If the sum of columns isn\'t equal to upper + lower: return []\n2.Since column sum 0 means the 2 rows are 0 and sum 2 mean the 2 rows are 2, we can add these numbers first.\n0  -->...0 and 2 --> 2\nrow2....0..................2\n3. We just need to decide which row to place 1 when column sum is 1, here we can use greedy and the problem is solved.\n\n\n```\n\t\tif sum(colsum) != upper+lower:\n            return []\n        nums = []\n        for t in range(2):\n            tem = []\n            for i in range(len(colsum)):\n                tem.append(\'#\')\n            nums.append(tem)\n        for i in range(len(colsum)):\n            if colsum[i] == 2:\n                nums[0][i] = 1\n                nums[1][i] = 1\n                upper -= 1\n                lower -= 1\n            elif colsum[i] == 0:\n                nums[0][i] = 0\n                nums[1][i] = 0\n                \n        for i in range(len(colsum)):\n            if colsum[i] == 1:\n                if upper > 0:\n                    nums[0][i] = 1\n                    nums[1][i] = 0\n                    upper -= 1\n                else:\n                    nums[1][i] = 1\n                    nums[0][i] = 0\n                    lower -= 1\n        if lower < 0 or upper < 0:\n            return []\n        return nums\n```
[]