http://codeforces.com/gym/101193/problem/A
#includeusing namespace std;#define ll long longconst ll mod=1e9+7;int n[55];int m[55];ll dp[55];ll dfs(int pos,bool lead,bool limit) { if(pos==-1) { return 1; } if(!limit && !lead && dp[pos]!=-1) return dp[pos]; int up=limit?n[pos]:9; int down=m[pos]; ll ans=0; for(int i=down; i<=up; i++) { //cout<<"pos="< <<" i="< < ln) return 0; int pos=0; for(int i=0;i =0) m[i]=mm[lm-1-i]-'0'; else m[i]=0; //cout<<"n["< <<"]="< <
.