inline int cal(int a,int b,int x){ if(a>b)return 0; if(a==0)return pre[b][x]; // !important return ((pre[b][x]-pre[a-1][x])%MOD+MOD)%MOD; }