public int maxScoreSightseeingPair(int[] A) {
int len = A.length;
int res = 0, cur = A[0] + 0;
for(int i = 1; i < len; ++i){
res = Math.max(res, cur+A[i] - i);
cur = Math.max(cur, A[i] + i);
}
return res;
}
1014. 最佳观光组合直接枚举 public int maxScoreSightseeingPair(int[] A) { int len = A.length; int res = 0, cur = A[0] + 0; for(int i = 1; i < len; ++i){ res = Math.max(res, cur+A[i] - i); cur = Math.max(cur, A[i