✅3 Line Easy C ++ Solution✅
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maxScoreSightseeingPair(vector<int>& values) {\n        int maxi=values[0],ans=INT_MIN;\n        for(int i=1;i<values.size();i++)\n        {\n            ans=max(ans,maxi+values[i]-i);\n            maxi=max(maxi,values[i]+i);\n        } \n        return ans;\n    }\n};\n```\n![upvote 3.png](https://assets.leetcode.com/users/images/d6a43374-4512-4d17-8b03-8f629f86cc53_1676181916.9870923.png)\n
['C++']