2019-04-13 12:10发布 生成海报
LL solve(){ for(i=1;iif((tr[i]-r)%d) return -1; x*=(tr[i]-r)/d; x=(x%(ttm[i]/d)+ttm[i]/d)%(ttm[i]/d); r+=x*m; m=m/d*ttm[i]; r%=m; } if(r<0) r+=m; return r; }