摘要:
数位dp 简介 数位dp指满足特定性质的数的计数, 如求 $[l, r]$ 区间内不含 $2$ 的数的个数. 一般来说, 数位dp利用dfs解决, 有时状态数较多, 需要hash表优化. 模板: // 求[l,r] 中各位数字之积为特定值(prod[])数的个数 ll dp[nsz][35][25] 阅读全文
摘要:
Description Solution 发现数字积数量很少, 枚举数字积 $S$, 然后数位dp求数字积为 $S$ 数的个数. Code include include include include include include include include define rep(i,l,r 阅读全文