https://scut.online/p/289 一个水到飞起的模板数位dp. #include<bits/stdc++.h> using namespace std; typedef long long ll; bool notp[2000]; const int MAXS1=200; const int MAXS2=2000; int a[20]; ll dp[20][MAXS1][MAXS2]; ll dfs(int pos,int s1,int s2,bool lead,bool l…
http://www.codeforces.com/gym/100827/attachments Hill Number Time Limits: 5000 MS Memory Limits: 200000 KB 64-bit interger IO format: %lld Java class name: Main Description A Hill Number is a number whose digits possibly rise and then possibl…
B-number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5000 Accepted Submission(s): 2866 Problem Description A wqb-number, or B-number for short, is a non-negative integer whose decimal for…
ID Origin Title 62 / 175 Problem A CodeForces 55D Beautiful numbers 30 / 84 Problem B HDU 4352 XHXJ's LIS 108 / 195 Problem C HDU 2089 不要62 89 / 222 Problem D HDU 3555 Bomb 59 / 107 Problem E POJ 3252 Round Numbers 47 / 75 Problem…
因为这几天写的几道数位DP大多都太水..而且也确实没什么好讲所以就扔到一起了. [hdu4772]Good Numbers 要求统计区间内 各位数之和能被10整除 的数的个数. 练手,f[i][j][k]表示i位的数,以j开头,各位数之和取模10的结果为k,的方案数. #include<cstdio> #include<iostream> #include<cstring> #define ll long long using namespace std; int i,…
Apocalypse Someday Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 1807 Accepted: 873 Description The number 666 is considered to be the occult “number of the beast” and is a well used number in all major apocalypse themed blockbuster…