|
|
back to boardDp Posted by Kirino 21 Feb 2016 20:47 dp[i][j] - represents number of staircases with i cubes and with the height of last block j. Answer is dp[n][1] + dp[n][2] + dp[n][3] ... dp[n][n]. Re: Dp can u help me with some algorithm better than dp(which works in O(n^2)) Edited by author 11.07.2016 03:57 |
|
|