Balanced Number Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box wi…
A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight indicated by the digit. When a pivot is placed at some digit of the number, the distance f…
因为这几天写的几道数位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,…