【LeetCode 1014】最佳观光对 Best Sightseeing Pair
#include <iostream>
#include <string.h>
using namespace std;
int maxScoreSightseeingPair(int a[],int n)
{
int i,j;
int max = -999999;
i = 0;
for (j = 1; j < n; j++)
{
if (a[i]+i+a[j]-j > max)
max =.
原创
2021-04-17 20:49:16 ·
84 阅读 ·
0 评论