dp with dimensions [n][2], where n is the length of nums, and the second dimension represents the parity (0 for even, 1 for odd).maxScoreFrom that takes the current index i and the parity of the last included number.nums[i] (updating the parity if needed and subtracting x if parities differ) or not including nums[i].nums[0]).