Easy sol^n
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 solve(long long add1,long long add2,int b,int c)\n  {\n       if(b==0&&c==0)\n        {\n            if(add1==add2)\n            return add1;\n            else\n            return -1;\n        }\n        else if((add2+(long long)c)>(add1+(long long)b))\n         {\n           if(b==0)\n           return -1;\n           else\n           return (add2+(long long)c); \n         }\n         else\n         {\n             if(c==0) \n             return -1;\n             else\n               return (add1+(long long)b);\n         }\n  } \n    long long minSum(vector<int>& nums1, vector<int>& nums2) {\n       long long sum1=0;\n       int a1=0;\n       long long sum2=0;\n       int a2=0;\n       for(int i=0;i<nums1.size();i++)\n       {\n          if(nums1[i]==0)\n          a1++;\n          else\n          sum1+=(long long)nums1[i];\n       }\n        for(int i=0;i<nums2.size();i++)\n       {\n          if(nums2[i]==0)\n          a2++;\n          else\n          sum2+=(long long)nums2[i];\n       }\n       if(sum1>sum2)\n       {\n          return solve(sum1,sum2,a1,a2); \n       }\n       else\n       {\n         return solve(sum2,sum1,a2,a1); \n       }\n    }\n};\n```
['Array', 'Greedy', 'C++']