EASY AND CLEAN APPROACH
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    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n        long long zero1=0, zero2=0, sum1=0, sum2=0;\n        for(int i=0; i<nums1.size(); i++){\n            if(nums1[i]==0) zero1++;\n            sum1+=nums1[i];\n        }\n\n        for(int i=0; i<nums2.size(); i++){\n            if(nums2[i]==0) zero2++;\n            sum2+=nums2[i];\n        }\n\n        if(sum1+zero1>sum2+zero2){\n            if(zero2==0) return -1;\n        }\n        if(sum2+zero2>sum1+zero1){\n            if(zero1==0) return -1;\n        }\n        return max(sum1+zero1, sum2+zero2);\n        \n        \n\n        // return -1;\n\n\n    }\n};\n```
['C++']