首页 > TAG信息列表 > HDU3555

HDU3555 Bomb(数位DP)

和HDU2089差不多,但是本题是求包含某个数的个数,采用代码第15行的方式实现,当然,也可以求不包含的个数,最后用总数减去也可以得到答案。 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 typedef long long LL; 5 const int N=30; 6 int dig[N]; 7 LL dp[N]