摘要:
这个题的主要思路是DP 其实整体的思路——我为人人 设立f[i][j],即为从起点到第i行第j列位置的方案数 那么我们需要考虑: 当已经走到了i,j这个点,那么我将用这个格子的能量(num[i][j])。 因为方向是只能向右向下(不限定方向你还能求?),所以我们需要枚举新的点x,y。 这个点x,y是 阅读全文
posted @ 2020-04-20 22:07
nhflsoiers
阅读(162)
评论(0)
推荐(0)
摘要:
带注释的代码,客官享用~~~ #include<iostream>#include<cstring> #include<cstdio> #include<algorithm> using namespace std; int dp[100009][20]; int main() { int n; i 阅读全文
posted @ 2020-04-20 15:40
nhflsoiers
阅读(93)
评论(0)
推荐(0)
摘要:
前二十个Humble Numbers:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27…… 用c2,c3,c5,c7做指针,a[i]= min(a[c2]*2,a[c3]*3,a[c5]*5,a[c7]*7) 阅读全文
posted @ 2020-04-20 13:37
nhflsoiers
阅读(226)
评论(0)
推荐(0)
浙公网安备 33010602011771号