![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数位dp
Lee丶0767
这个作者很懒,什么都没留下…
展开
-
数位dp windy数
题目描述: Description windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A和B之间,包括A和B,总共有多少个windy数?Input 包含两个整数,A B。Output 一个整数Sample Input 【输入样例一】 1 10 【输入样例二】 25 50 Sample Output原创 2016-08-30 14:44:34 · 512 阅读 · 0 评论 -
数位dp Beautiful numbers
题目描述: Description Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We原创 2016-08-30 22:20:45 · 427 阅读 · 0 评论 -
数位DP 总结
数位dp适合在一段数的区间内找出满足某些条件的数的个数,这个时候往往不能之间遍历,肯定会超时,则一般使用数位dp来解决。数位dp的常见形式是dp[i][j],表示开头是j的i位数满足条件的有多少个,当然也有其他dp[i][j][k]等等,但i,j,k都很小,不会像直接遍历那么耗时。以前做过一个不要62的题(HDU2089),当时没用数位,直接枚举也过了。 还有一个比较简单的是HDU3555,就是统原创 2016-08-21 22:17:45 · 247 阅读 · 0 评论 -
数位专题B-number HDU 3652
问题描述: Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers,原创 2016-08-21 22:22:21 · 211 阅读 · 0 评论