摘要: 问一段数字区间满足奇数位大于其相邻偶数位的数有多少,值得注意的是其第0位是最高位不是最低位 - -。基础的数位DP。dp[19][10][2],分别表示第几位,前一位数是几,这个为是奇数位还是偶数位。View Code #include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <string>using namespace std;#define LL long longconst int Mod = 2520;LL dp[19 阅读全文
posted @ 2013-04-11 13:35 gray035 阅读(186) 评论(0) 推荐(0) 编辑