c++ easy solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> reconstructMatrix(int upper, int lower, vector<int>& colsum) {\n        int n = colsum.size();\n        vector<vector<int>>ans(2, vector<int>(n));\n        vector<vector<int>>temp;\n        if(upper+lower != accumulate(colsum.begin(), colsum.end(), 0)) return temp;\n        for(int i=0;i<n;i++){\n            if(colsum[i]==2){\n                ans[0][i] = 1;\n                ans[1][i] = 1;\n                upper--;\n                lower--;\n            }\n            else if(colsum[i]==1){\n                if(upper>lower){\n                    ans[0][i] = 1;\n                    upper--;\n                }\n                else{\n                    ans[1][i] = 1;\n                    lower--;\n                }\n            }\n        }\n    if(lower!=0 || upper!=0) return temp;\n        return ans;\n    }\n};\n```
['C++']