python
Code
# Code
```python3 []
class Solution:
    def getLargestOutlier(self, nums: List[int]) -> int:
        # find smallest special_sum, sum(nums) - 2 * special_sum
        # cnt freq
        # for each element, check if possible
        cnt = Counter(nums)
        total_sum = sum(nums)
        res = -inf
        for k, v in cnt.items():
            # outlier k, special_sum = (total - k) / 2
            if k < res:
                continue
            if (total_sum - k) % 2 == 1:
                continue
            special_sum = (total_sum - k) // 2
            if special_sum not in cnt or special_sum == k and cnt[k] < 2:
                continue
            res = max(res, k)
        return res
```
['Python3']