数位DP #include<cstdio> #include<cstring> using namespace std; int A[16]; long long F[16][13][10][2]; long long dfs(int t,int Y,int Last,int lim13,int lim){ if (!lim && F[t][Y][Last][lim13]!=-1) return F[t][Y][Last][lim13]; if (t==0){ if…
3858: Number Transformation Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 82 Solved: 41[Submit][Status] Description Teacher Mai has an integer x. He does the following operations k times. In the i-th operation, x becomes the least integer no less th…