如果你真的能取模的都取模了并且是50pts或者60pts,那请看看数据
0≤p,ai,c≤109
0!
void pushdown(int now){
//请注释他 if(tr[now].mul||tr[now].lazy){
tr[now<<1].mul*=tr[now].mul;
tr[now<<1].mul%=p;
tr[now<<1|1].mul*=tr[now].mul;
tr[now<<1|1].mul%=p;
tr[now<<1].lazy*=tr[now].mul;
tr[now<<1].lazy%=p;
tr[now<<1].lazy+=tr[now].lazy;
tr[now<<1].lazy%=p;
tr[now<<1|1].lazy*=tr[now].mul;
tr[now<<1|1].lazy%=p;
tr[now<<1|1].lazy+=tr[now].lazy;
tr[now<<1|1].lazy%=p;
tr[now<<1].sum*=tr[now].mul;
tr[now<<1].sum%=p;
tr[now<<1].sum+=(tr[now<<1].r-tr[now<<1].l+1)*tr[now].lazy;
tr[now<<1].sum%=p;
tr[now<<1|1].sum*=tr[now].mul;
tr[now<<1|1].sum%=p;
tr[now<<1|1].sum+=(tr[now<<1|1].r-tr[now<<1|1].l+1)*tr[now].lazy;
tr[now<<1|1].sum%=p;
tr[now].mul=1;
tr[now].lazy=0;
// }
}