摘要: 1 /* 2 这题还没有理解透彻。某个dalao也不写注释。只能自己理解了。。。 3 先求为i个元素(1 8 #define maxn 1000005 9 #define inf 1(b)?(a):(b) 11 int d[maxn],m[maxn],a[maxn]; 12 void init(int n) 13 { 14 for(int i=0; i<n; ++i) 15 ... 阅读全文
posted @ 2017-05-06 19:38 Posase 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 背包专题:http://www.cnblogs.com/qq188380780/p/6409474.html 阅读全文
posted @ 2017-05-06 19:06 Posase 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 //数位dp入门 2 #include 3 int a[8],d[8][3]; 4 5 void init() 6 { 7 d[0][0] = 1; 8 for(int i=1; i0; --i) //求0-x之间不吉利数个数 27 { 28 ans += d[i-1][2]*a[... 阅读全文
posted @ 2017-05-06 15:29 Posase 阅读(230) 评论(0) 推荐(0) 编辑