6Line code || TIME O(n) || C++ || MOST SIMPLE & OPRIMIZED
Code\n    int maxScoreSightseeingPair(vector& values) {\n        int ans = 0, sum = values[0];\n        for(int i = 1; i < values.size(); i++){\n            ans
# Code\n    int maxScoreSightseeingPair(vector<int>& values) {\n        int ans = 0, sum = values[0];\n        for(int i = 1; i < values.size(); i++){\n            ans = max(ans,sum+values[i]-i);\n            sum = max(sum,values[i]+i);}\n        return ans;\n    }\n```
['Array', 'Dynamic Programming', 'C++']