【Asia Yokohama Regional Contest 2018】Arithmetic Progressions
题目大意:给定N(1usingnamespacestd;constintmaxn=5010;intn,a[maxn],dp[maxn][maxn],ans;intmain(){scanf("%d",&n);for(inti=1;i=1&&a[j]-a[i]>a[i]-a[l])--l;if(l>=1&&a[j]-a[i]==a[i]-a[l])dp[i][j]=max(dp[i][j],dp[l]