正文
增加 4 行删除 4 行
15 行未改动1617181920212223242526272829305 行未改动36373839404142434432 行未改动77787980818283848515 行未改动15 行未改动inline ll read(){ll sg=1,x=0;char ch=getchar();while(!isdigit(ch)){if(ch=='-')sg=-1;ch=getchar();}while(isdigit(ch)){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}return sg*x;}ll n,q;ll hs[N];5 行未改动return p<oth.p;}}req[N];ll ans[N];int nxt[N];//记为下一个可重集出现的位置void solve(){n=read(),q=read();memset(hs,0,sizeof(hs));memset(dp,0,sizeof(dp));32 行未改动nk+=g;if(dp[np]==nk)np=nxt[np];}if(tot<m)ans[req[i].id]=-1;else if(tot>m&&nk<2){//特判可能只需划分为一个集合的情况ans[req[i].id]=2;}else {ans[req[i].id]=nk;15 行未改动15 行未改动1617181920212223242526272829305 行未改动36373839404142434432 行未改动77787980818283848515 行未改动15 行未改动inline ll read(){ll sg=1,x=0;char ch=getchar();while(!isdigit(ch)){if(ch=='-')sg=-1;ch=getchar();}while(isdigit(ch)){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}return sg*x;}ll n,q;ll hs[N];5 行未改动return p<oth.p;}}req[N];ll ans[N];int nxt[N];//记为下一个可重集出现的位置void solve(){n=read(),q=read();memset(hs,0,sizeof(hs));memset(dp,0,sizeof(dp));32 行未改动nk+=g;if(dp[np]==nk)np=nxt[np];}if(tot<m)ans[req[i].id]=-1;else if(tot>m&&nk<2){//特判可能只需划分为一个集合的情况ans[req[i].id]=2;}else {ans[req[i].id]=nk;15 行未改动