随笔分类 - [kuangbin带你飞]专题十五 数位DP
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 #define Faster ios::sync_with_stdio(false),cin.tie(0) 11 #define Read freopen("in.txt","...
阅读全文
摘要:1 #include "cstdio" 2 #include "math.h" 3 #include "cstring" 4 #define mod 1000000007LL 5 #define LL long long 6 7 struct node 8 { 9 LL cnt,sum,sqsum; 10 node() {cnt=-1;sum=sqsum=0;...
阅读全文
摘要:1 #include 2 #include 3 using namespace std; 4 typedef long long ll; 5 6 int a[20]; 7 int dp[20][15][3]; 8 9 //pos:当前位置 10 //mod:余数 11 //have :0:前一位不是1 1:前一位是1 2:有13 12 ll dfs(int pos,in...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 #define LL long long 11 const int MOD = 2520; 12 ...
阅读全文
摘要:1 //反向62 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 typedef long long ll; 10 // const int maxn = 1e5+5; 11 ll n; 12 ll a[100]; 13 ll dp[100][100]...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 const int maxn = 2*1e9+5; 9 int dp[100][100]; 10 int a[100]; 11 12 //lead是否有前导0 13 int dfs(int pos,in...
阅读全文
摘要:dalao博客:https://blog.csdn.net/wust_zzwh/article/details/52100392
阅读全文