Beats 100%
Code

# Code
```golang []
func maxScoreSightseeingPair(values []int) int {
    n:=len(values)
    ans := 0
    a := values[0]
    for i:=1;i<n;i++{
        b := values[i]-i
        ans = max(ans,a+b)
        a = max(a,values[i]+i)
    }

    return ans
}
```
['Go']