#include #include #include using namespace std; typedef struct { int l,r,sum; int lsum,rsum,midsum; }Tree; Tree tree[500005]; int a[100005]; int c[2000][2000]; int ans,rans; int Count(int t) { if (t==0) return 0; int s=0; while(t) { s+=t%10; t/=10; } s%=9; if (s==0) return 9; return s; } int Pre() { int i,j,x,y; for (i=0;i<1024;i++) { for (j=i;j<1024;j++) { c[i][j]=0; for (x=0;x<10;x++) { if ((i & (1<=x) Query(2*t+1,x,min(y,mid)); if (mid=0;i--) { if (ans>=(1<0) printf("\n"); } return 0; }