Dp state not clear

what does dp[i,j] denote?
how to calculate year number from i,j,…

diagonal elements what do they denote

diagonal elements what do they mean

@dakshi,
dp[i][j]= Max profit in selling bottles from i to j.
Year = No. of bottles sold = Total bottles - No. of bottles not soled = n-(i-j+1).