![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
递推
KageMushaHRo
懒 狗
展开
-
P1037 产生数
P1037 DFS+高精度乘低精度 一道简单题,对每一位数字进行dfs,看最多能变换几次,最后利用乘法原理相乘就是结果 话不多说,直接干代码: #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <cmath> #include <cctype> #include <cstring> #include <string> #include <sstream> #inclu原创 2020-05-19 17:22:48 · 252 阅读 · 0 评论 -
P1028 数的计算
P1028 记忆化dfs或递推 首先,此题如若用普通的递归,肯定是过不了所有点的。所以要么用记忆化要么用递推。 先来一壶记忆化的代码,实现不难: #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <cctype> #include <string> #include <sstream> #include <stack> #include <set> #include原创 2020-05-19 14:18:52 · 93 阅读 · 0 评论