Insights From Problem: Codeforces 1970E1: Trails (Easy) (View all problems)
- dp[i][j]: i = the day, j = the cabin, dp[i][j] = thre number of ways you can get to the cabin say cabin you're exiting is cabin w; iterate through all the possible cabin ws, dp[i][j] = dp[i-1][w] * wshort*jLong + dp[i-1][w]*wLong*jShort + dp[i-1][w]*wShort*jShort. by s3rena_cc
- i wrongly defined all the initial states as 1 becuase if it has 0 paths then it's not 1 its 0. by s3rena_cc
- so instead of working from backwards i just did working forwards by s3rena_cc
- also i missed a few by s3rena_cc
Page 1 of 1.
View links to all pages
1About • Privacy Notice • Rules • Problems list • Journal • Your profile • GitHub
Moon Symbol icon by Icons8 • Sun icon by Icons8 • Emojis from Twemoji by Twitter under CC by 4.0