HDU 3652 數字DP 套路題

2022-05-07 03:39:09 字數 520 閱讀 7321

題意:統計能被13整除和含有13的數的個數

解法沒法好說的..學了前面兩道直接啪出來了

ps.hdu深夜日常維護,沒法交題,拿網上的**隨便對拍一下,輸出一致

#include#define rep(i,j,k) for(register int i=j;i<=k;i++)

using namespace std;

const int maxn = 20;

typedef long long ll;

int a[maxn];

ll r,dp[maxn][2][2][13];

ll dp(int cur,int pre,int ok,int mod,int limit)

return limit?ans:dp[cur][pre][ok][mod]=ans;

}int main()

printf("%lld\n",dp(cur,0,0,0,1));

} return 0;

}

HDU 3652 數字DP 解題報告

b number problem description a wqb number,or b number for short,is a non negative integer whose decimal form contains the sub string 13 and can be div...

HDU3652 數字DP 記憶化搜尋

problem description a wqb number,or b number for short,is a non negative integer whose decimal form contains the sub string 13 and can be divided by 1...

數字DP與記憶化搜尋 HDU3652

上題目b number b number problem description a wqb number,or b number for short,is a non negative integer whose decimal form contains the sub string 13 an...