|
|
back to boardShow all messages Hide all messagesSimply use DP with Recurse and You'll get AC! not to much to prove, suppose we have dp[x] where x is an integer number beetwen s and n, we calculate the numbers wich are integer percent of x. for example y is a number wich is an integer percent of x like(y = x*(50/100)), the reccurence is dp[x] = max(dp[x], dp[y] + 1) among all y which are integer percent |
|
|