正文
增加 3 行删除 3 行
25 行未改动26272829303132333432 行未改动6768697071727374757677787925 行未改动#define len(str) (str.length())#define inr(L,R,l,r) (l<=L and R<=r)#define ofr(L,R,l,r) (L>r or l>R)#define lowbit(x) (x&(-x))#define tn2 tuple<node*,node*>#define tn3 tuple<node*,node*,node*>#define mt make_tuple#define np nullptr#define ioo cin.tie(0)->sync_with_stdio(0);cout.tie(0)->sync_with_stdio(0);32 行未改动if(sum(t[i])-sum(t[i]-1)) add(t[i],-1);else break;k=k*(sum(t[i])-sum(t[i]-1)+1)%P;j=i;}if(j==n and n<m) ans=(ans+k)%P;rep(i,1,2e5) ans=ans*inv[cnt[i]]%P;cout<<ans<<endl;}```:::25 行未改动26272829303132333432 行未改动6768697071727374757677787925 行未改动#define len(str) (str.length())#define inr(L,R,l,r) (l<=L and R<=r)#define ofr(L,R,l,r) (L>r or l>R)#define lowbit(x) (x&(-x))#define tn2 tuple<node*,node*>#define tn3 tuple<node*,node*,node*>#define mt make_tuple#define np nullptr#define ioo cin.tie(0)->sync_with_stdio(0);cout.tie(0)->sync_with_stdio(0);32 行未改动if(sum(t[i])-sum(t[i]-1)) add(t[i],-1);else break;k=k*(sum(t[i])-sum(t[i]-1)+1)%P;j=i;}if(j==n and n<m) ans=(ans+k)%P;rep(i,1,2e5) ans=ans*inv[cnt[i]]%P;cout<<ans<<endl;}```:::