------
## 最终结论
```python
def maximumSum(arr):
    n = len(arr)
    if n == 0:
        return 0
    
    # dp[i] will hold the maximum subarray sum ending at index i without deletion
    dp = [0] * n
    # max_sum_with_deletion[i] will hold the maximum subarray sum ending at index i with one deletion
    max_sum_with_deletion = [0] * n
    
    dp[0] = arr[0]
    max_sum_with_deletion[0] = arr[0]
    
    max_sum = arr[0]  # This will store the final result
    
    for i in range(1, n):
        dp[i] = max(arr[i], dp[i - 1] + arr[i])  # Max subarray sum ending at i without deletion
        max_sum_with_deletion[i] = max(max_sum_with_deletion[i - 1] + arr[i], dp[i - 1])  # Max with one deletion
        
        # Update the overall maximum sum found so far
        max_sum = max(max_sum, dp[i], max_sum_with_deletion[i])
    
    return max_sum

# Example usage:
print(maximumSum([1, -2, 0, 3]))  # Output: 4
print(maximumSum([1, -2, -2, 3]))  # Output: 3
print(maximumSum([-1, -1, -1, -1]))  # Output: -1
```