动态规划 class Solution:def longestArithSeqLength(self, nums):size = len(nums)maxv = 0dp = [[1] * 1001 for _ in range(size)]for i in range(size):for j in range(i):d = nums[j] - nums[i] + 500dp[i][d] = ma
【题目来源】http://acm.hdu.edu.cn/showproblem.php?pid=1027【题目描述】 Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the