|
|
back to boardDP? Can anybody post DP approach, if any exists? Re: DP? Dp[i][diff][c]: amount of pairs of numbers (A, B) of size i where S(A+B)-S(A)-S(B)=diff and we carry c from the sum of A and B Here we consider also number with leading zeroes, we can notice that **diff** is in the range [-460, 900] -maybe we can make it narrower- and that **c** is either 0 or 1. |
|
|