![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数位DP
synapse7
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #235 (Div. 2) / 410D Roman and Numbers (带有整除性质的数位DP)
http://codeforces.com/problemset/problem/401/D解释全部在代码的注释中:/*78ms,205464KB*/#includeusing namespace std;const int mx = 1 << 18;long long dp[mx][100];///dp[mask][j]表示余数为j时的mask对应的x的个数///原创 2014-03-11 20:25:34 · 2056 阅读 · 0 评论 -
数位DP小记 + HDU 2089 不要62
【背景】如何求出在给定区间[A,B]内,符合条件P(i)的数i的个数?条件P(i)一般与数的大小无关,而与数的组成有关,有一下几种P(i):数i是递增/递减的:1234, 2579,…双峰的:19280,26193,…含/不含某一数字的,比如含49:49, 149, 1492,… 被某一数m整除的,比如m=13:39,130,650...【思路】采用原创 2014-03-11 13:14:59 · 1909 阅读 · 1 评论