EASY c++ Solution
\ncpp []\nclass Solution {\npublic:\n    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n        int cnt1=0;\n        int cnt2=0;\n        long long
\n```cpp []\nclass Solution {\npublic:\n    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n        int cnt1=0;\n        int cnt2=0;\n        long long sum1=0;\n        long long sum2=0;\n        for(auto i:nums1)\n        {\n            if(i==0)\n            {\n                cnt1++;\n            }\n            if(i==0)\n            {\n                sum1+=1;\n            }\n            else{\n            sum1+=i;\n            }\n        }\n        for(auto i:nums2)\n        {\n            if(i==0)\n            {\n                cnt2++;\n            }\n            if(i==0)\n            {\n                sum2+=1;\n            }\n            else{\n            sum2+=i;\n            }\n        }\n        if(sum1>sum2 && cnt2==0)\n        {\n            return -1;\n        }\n        if(sum1<sum2 && cnt1==0)\n        {\n            return -1;\n        }\n        return max(sum1,sum2);\n\n    }\n};\n```
['C++']