C++ || Greedy
\nclass Solution {\npublic:\n    \n    #define ll long long\n    \n    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n        ll int s1=0, s2=0;\n 
```\nclass Solution {\npublic:\n    \n    #define ll long long\n    \n    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n        ll int s1=0, s2=0;\n        int c1=0, c2=0;\n        \n        for(int val:nums1){\n            s1 += val;\n            c1 += (val==0);\n        }\n        for(int val:nums2){\n            s2 += val;\n            c2 += (val==0);\n        }\n        \n        if(c1==0 && s1<s2+c2) return -1;\n        if(c2==0 && s2<s1+c1) return -1;\n        \n        return max(s1+c1,s2+c2);\n    }\n};\n```
['Greedy', 'C++']