随笔分类 -  动态规划——数位dp与计数dp

摘要:"ref" cpp include include include using namespace std; typedef long long ll; int a[15]; ll u, v, dp[11][11][11][2][2][2][2]; //[算当前剩几位][当前最大可用][上一位是啥] 阅读全文
posted @ 2018-04-26 16:13 poorpool 阅读(161) 评论(0) 推荐(0)
摘要:"ref" "ref" 一个点就是一个数对 $(x,y)$。 记状态 $f[i][1/0][1/0][1/0]$ 和 $g[i][1/0][1/0][1/0]$,其中三个 $1/0$ 取值分别代表“$x$ 在前 $i$ 位卡满 $n$(的前 $i$ 位)/小于它”、“$y$ 在前 $i$ 位卡满 $ 阅读全文
posted @ 2018-04-19 21:37 poorpool 阅读(170) 评论(0) 推荐(0)