摘要:
#include<iostream>#include<algorithm>using namespace std;#define LL long longLL f[12][10],dp[12],digit[13];//f[i][j]表示第i位为j,且长度为i的windy数的个数//d[i]表示长度为i的windy数的个数LL cal(LL n){ if(n<10) return n-1; int len=0,i,j; LL ans=0; while(n) { digit[++len]=n%10; n/=10; } for(i... 阅读全文
posted @ 2013-03-28 21:21
小仪在努力~
阅读(187)
评论(0)
推荐(0)
摘要:
/*区间求不含有62和4的数量,我的第一道数位DP*/#include<stdio.h>#include<iostream>#include<cstring>using namespace std;int dp[20][3];int cal(int key){ int digit[20],len=0,ans=0; memset(digit,0,sizeof(digit)); int ok=key; while(ok) { digit[++len]=ok%10; ok/=10; } bool flag=false; fo... 阅读全文
posted @ 2013-03-28 16:39
小仪在努力~
阅读(299)
评论(0)
推荐(0)
浙公网安备 33010602011771号